[PATCH] D52016: [clangd] Don't create child AND and OR iterators with one posting list
Kirill Bobyrev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 13 02:40:31 PDT 2018
kbobyrev added inline comments.
================
Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:148
+ if (TrigramIterators.size() > 1)
TopLevelChildren.push_back(createAnd(move(TrigramIterators)));
+ else if (TrigramIterators.size() == 1)
----------------
ilya-biryukov wrote:
> Maybe special-case a single-iterator case in `createAnd` instead? Same with `createOr`.
> Any cons to doing so?
I thought that this might result in some implicit query tree generation semantics. However, since there optimizations are likely to be added at some point, I guess we could start being implicit right now, especially given that there is no good way for the user code to inspect the query tree structure (and there's no good reason to do so, too).
https://reviews.llvm.org/D52016
More information about the cfe-commits
mailing list