diff options
author | Hongtao Yu <hoy@fb.com> | 2021-08-31 16:30:49 -0700 |
---|---|---|
committer | Hongtao Yu <hoy@fb.com> | 2021-09-01 12:17:48 -0700 |
commit | f4711e0d009b7e62fc1fa3c070878ad366710487 (patch) | |
tree | df3bcd0df74c809d3edd5d6ce85ec51bbad37dcd /clang/unittests/Basic/FileManagerTest.cpp | |
parent | 02f74eadbe2f56db4807dbc785a99e941a98300a (diff) | |
download | llvm-f4711e0d009b7e62fc1fa3c070878ad366710487.zip llvm-f4711e0d009b7e62fc1fa3c070878ad366710487.tar.gz llvm-f4711e0d009b7e62fc1fa3c070878ad366710487.tar.bz2 |
[CSSPGO] Sort function offset table to speed up profile loading.
With the context split work, the context-based (an array of strings) sorting performed at profile load time is way more expansive than single-string-based sorting. This is likely due to auxiliary operations done on each array element, such as indirect references, std::min operations, also likely cache misses. In this change I'm presorting profiles during profile generation time to avoid sorting at compile time.
Compared to the previous context-split work, this effectively cuts down compile time by 20% for one of our large services and brings us closer to non-CS build, with still a small gap in build time.
Reviewed By: wenlei, wmi
Differential Revision: https://reviews.llvm.org/D109036
Diffstat (limited to 'clang/unittests/Basic/FileManagerTest.cpp')
0 files changed, 0 insertions, 0 deletions