This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Use TRUE iterator instead of complete posting list
ClosedPublic

Authored by kbobyrev on Aug 27 2018, 1:51 AM.

Details

Summary

Stop using $$$ (empty) trigram and generating a posting list with all items. Since TRUE iterator is already implemented and correctly inserted when there are no real trigram posting lists, this is a valid transformation.

Benchmarks show that this simple change allows ~30% speedup on dataset of real completion queries.

Before

-------------------------------------------------------
Benchmark                Time           CPU Iterations
-------------------------------------------------------
DexAdHocQueries    5640321 ns    5640265 ns        120
DexRealQ         939835603 ns  939830296 ns          1

After

-------------------------------------------------------
Benchmark                Time           CPU Iterations
-------------------------------------------------------
DexAdHocQueries    3452014 ns    3451987 ns        203
DexRealQ         667455912 ns  667455750 ns          1

Diff Detail

Repository
rL LLVM

Event Timeline

kbobyrev created this revision.Aug 27 2018, 1:51 AM
kbobyrev edited the summary of this revision. (Show Details)Aug 27 2018, 1:51 AM
This revision is now accepted and ready to land.Aug 27 2018, 2:41 AM
This revision was automatically updated to reflect the committed changes.