ioeric 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". ---------------- 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? ================ 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; ---------------- Why do we need `P.second.bytes() * sizeof(DocID)`? Isn't `P.second.bytes()` already the memory size of the posting list? https://reviews.llvm.org/D52047 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits