[PATCH] D53363: [clangd] Encode Line/Column as a 32-bits integer.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 17 03:38:06 PDT 2018
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov.
This would buy us more memory. Using a 32-bits integer is enough for
most human-readable source code (up to 4M lines and 4K columns).
Previsouly, we used 8 bytes for a position, now 4 bytes, it would save
us 8 bytes for each Ref and each Symbol instance.
For LLVM-project binary index file, we save ~13% memory.
| Before | After |
| 412MB | 355MB |
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53363
Files:
clangd/index/Index.h
clangd/index/YAMLSerialization.cpp
unittests/clangd/FileIndexTests.cpp
unittests/clangd/SerializationTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53363.169981.patch
Type: text/x-patch
Size: 4578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181017/a3c60be7/attachment.bin>
More information about the cfe-commits
mailing list