Open
Description
Operations with symbols such as name lookup are expensive and some binaries have millions of symbols, so it makes sense to try to reduce the symbol-related overheads.
Measure how much the following cost and refactor/eliminate:
- Checks for symbol name being equal to __asan_init and __llvm_coverage_mapping for every single symbol:
llvm-project/bolt/lib/Rewrite/RewriteInstance.cpp
Lines 824 to 837 in a1423ba
- FileName set for every local function symbol (with O(1M) for large binaries) while we can instead use file symbol lookup with O(log N_Syms) cost and FileSyms memory cost [BOLT][NFCI] Use FileSymbols for local symbol disambiguation #89088
- Merge iteration over two loops over symbols into one: and