[PATCH] D59407: [clangd] Add RelationSlab

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 17 11:10:37 PDT 2019

nridge added a comment.

In D59407#1430656 <https://reviews.llvm.org/D59407#1430656>, @kadircet wrote:

> I believe it makes sense to deduplicate SymbolIDs for RelationSlab.
>  Up until now, we mostly had only one occurence of a SymbolID in a Slab, but RelationSlab does not follow that assumption.

Just to make sure I understand, do you mean:

(A) When adding a `SymbolID` to an entry's value, check that it's not already there; or
(B) Try to conserve space by not storing `SymbolID`s directly in the entries, but storing an index into a separate list of unique `SymbolID`s.

If it's (B), how many bytes should the index be? Are the space gains worth the complexity, given that `SymbolID` is only 8 bytes to begin with? (As compared to say, the filenames in `Ref`, which can be much longer, making this sort of optimization more clearly worth it.)

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list