HomePhabricator

[Index] Reduce size of SymbolInfo struct.

Description

[Index] Reduce size of SymbolInfo struct.

Summary:
This is currently 16 bytes, the patch reduces it to 4.
(Building with clang on linux x84, I guess others are similar)

The only subfield that might need a bigger type is SymbolPropertySet,
I've moved it to the end of the struct so if it grows, SymbolInfo will
only be 8 bytes.

With a full index of namespace-scope symbols from the LLVM project (200k)
loaded into clangd, this saves ~2MB of RAM.

Reviewers: akyrtzi

Subscribers: ilya-biryukov, cfe-commits

Differential Revision: https://reviews.llvm.org/D41514

Details

Committed
sammccallDec 23 2017, 11:31 AM
Differential Revision
D41514: [Index] Reduce size of SymbolInfo struct.
Parents
rL321410: [NFC] Remove a cast rendered unnecessary by r321409
Branches
Unknown
Tags
Unknown