[PATCH] D51090: [clangd] Add index benchmarks

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 22 02:21:51 PDT 2018


kbobyrev created this revision.
kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall.
kbobyrev added a project: clang-tools-extra.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, mgorny.

This patch introduces index benchmarks on top of the proposed LLVM benchmark pull.

The preliminary results are here (benchmark invocation is given LLVM + Clang + Clang-Tools-Extra + libc++ symbol database):

2018-08-22 11:12:34
Run on (72 X 3700 MHz CPU s)
CPU Caches:

  L1 Data 32K (x36)
  L1 Instruction 32K (x36)
  L2 Unified 1024K (x36)
  L3 Unified 25344K (x2)

-------------------------------------------------------

Benchmark                Time           CPU Iterations
------------------------------------------------------

BuildMem        6042296009 ns 6041974540 ns          1
MemAdHocQueries  117140353 ns  117134140 ns          6
BuildDex        8902015670 ns 8901575912 ns          1
DexAdHocQueries    5137288 ns    5137076 ns        132

Dex is about 22 times faster compared to MemIndex despite actually processing 100x more items since `ItemsToRetrieve = 100 * Req.MaxCandidateCount`. When setting `ItemsToRetrieve = Req.MaxCandidateCount`, it is up to 1000x faster.


https://reviews.llvm.org/D51090

Files:
  clang-tools-extra/clangd/CMakeLists.txt
  clang-tools-extra/clangd/benchmarks/CMakeLists.txt
  clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp
  clang-tools-extra/clangd/index/SymbolYAML.cpp
  clang-tools-extra/clangd/index/SymbolYAML.h
  clang-tools-extra/clangd/index/dex/DexIndex.cpp
  clang-tools-extra/clangd/tool/ClangdMain.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51090.161902.patch
Type: text/x-patch
Size: 7454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180822/a74bc9ce/attachment.bin>


More information about the cfe-commits mailing list