llvm-project/clang-tools-extra/clangd/index/dex
Kirill Bobyrev b217ddb1bb [clangd] Use TRUE iterator instead of complete posting list
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
```

Reviewed by: ilya-biryukov

Differential Revision: https://reviews.llvm.org/D51287

llvm-svn: 340729
2018-08-27 09:47:50 +00:00
..
DexIndex.cpp [clangd] Implement LIMIT iterator 2018-08-24 11:25:43 +00:00
DexIndex.h [clangd] Log memory usage of DexIndex and MemIndex 2018-08-24 09:12:54 +00:00
Iterator.cpp [clangd] Implement LIMIT iterator 2018-08-24 11:25:43 +00:00
Iterator.h [clangd] Implement LIMIT iterator 2018-08-24 11:25:43 +00:00
Token.h [clangd] DexIndex implementation prototype 2018-08-20 14:39:32 +00:00
Trigram.cpp [clangd] Use TRUE iterator instead of complete posting list 2018-08-27 09:47:50 +00:00
Trigram.h NFC: Enforce good formatting across multiple clang-tools-extra files 2018-08-14 16:03:32 +00:00