[PATCH] D158689: [llvm-profdata] Fix dangling reference after D147740
William Junda Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 16:26:16 PDT 2023
huangjd added a comment.
DenseMap is significantly faster than std::unordered_map as previously used.
Benchmarking with an internal profile for production, when reading the function offset table alone, the original implementation (before D147740 <https://reviews.llvm.org/D147740>), DenseMap, and unordered_map takes 1.2, 0.78, 0.82 s respectively, and reading the full profiles takes 34.6, 29.0, 31.4 s respectively. That means using a std::unordered_map is 5-8% slower. (Meanwhile the refactoring itself has been very significant regardless of which container to use)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158689/new/
https://reviews.llvm.org/D158689
More information about the llvm-commits
mailing list