[llvm-branch-commits] [BOLT][NFC] Speedup BAT::writeMaps (PR #112061)
Amir Ayupov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Oct 11 17:02:59 PDT 2024
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/112061
For a large binary with BAT section of size 38 MB with ~170k maps,
reduces writeMaps time from 70s down to 1s.
The inefficiency was in the use of std::distance with std::map::iterator
which doesn't provide random access. Use sorted vector for lookups.
Test Plan: NFC
More information about the llvm-branch-commits
mailing list