kbobyrev added inline comments.

================
Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:69
 
+// This is not a *real* benchmark: it shows size of built MemIndex (in bytes).
+// Same for the next "benchmark".
----------------
ioeric wrote:
> The hack might not be obvious for other people who run these benchmarks. Is 
> it possible to print some extra message along with the result to explain the 
> hack? 
Yes, that makes sense. I might try to use [[ 
https://github.com/google/benchmark#user-defined-counters | User-Defined 
Counters ]] for that.


================
Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:239
   for (const auto &P : InvertedIndex)
-    Bytes += P.second.bytes();
+    Bytes += P.first.Data.size() + P.second.bytes() * sizeof(DocID);
   return Bytes + BackingDataSize;
----------------
ioeric wrote:
> Why do we need `P.second.bytes() * sizeof(DocID)`? Isn't `P.second.bytes()` 
> already the memory size of the posting list?
Yes, the patch is out of sync. Will fix!


https://reviews.llvm.org/D52047



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to