[all-commits] [llvm/llvm-project] a0987e: [clangd] Improve performance of dex by 45-60%
Kirill Bobyrev via All-commits
all-commits at lists.llvm.org
Fri Jul 23 06:29:08 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a0987e350ccce4fb9c3cbaf56732be1def5f810f
https://github.com/llvm/llvm-project/commit/a0987e350ccce4fb9c3cbaf56732be1def5f810f
Author: Kirill Bobyrev <kbobyrev at google.com>
Date: 2021-07-23 (Fri, 23 Jul 2021)
Changed paths:
M clang-tools-extra/clangd/index/dex/Iterator.cpp
Log Message:
-----------
[clangd] Improve performance of dex by 45-60%
Take full advantage of AND's iterator children size estimation: use early reset
in sync() and prevent large overhead. The idea is that the children at the
beginning of the list are smaller and cheaper to advance. Very large children
negate the effect of this performance optimisation and hence should be
advanced only when absolutely necessary. By reducing the number of large
iterators' updates, we increase the performance by a large margin.
This change was tested on a comprehensive query dataset. The performance
boost increases with the average length of the query, on small queries it is
close to 45% but the longer they go the closer it gets to 60% and beyond.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D106528
More information about the All-commits
mailing list