[PATCH] D51802: [clangd] Make advanceTo() faster on Posting Lists

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 10 00:17:53 PDT 2018


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:41
     assert(!reachedEnd() && "DOCUMENT iterator can't advance() at the end.");
+    if (peek() >= ID)
+      return;
----------------
Maybe add a short comment that this gives performance boost?
Otherwise this looks redundant when reading the code


https://reviews.llvm.org/D51802





More information about the cfe-commits mailing list