llvm-project
79d695f0 - [BOLT][NFCI] Speedup BAT::writeMaps

Commit
1 year ago
[BOLT][NFCI] Speedup BAT::writeMaps 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 Reviewers: maksfb, rafaelauler, dcci, ayermolo Reviewed By: maksfb Pull Request: https://github.com/llvm/llvm-project/pull/112061
Author
Parents
Loading