[PATCH] D158689: [llvm-profdata] Use llvm::DenseMap in SampleProfileMap
Wei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 29 21:55:46 PDT 2023
weiwang added a comment.
We did some measurement internally on `DenseMap` vs. `std::unordered_map`.
The test was setup on a dedicated devserver as follows:
- Pick the top 100 slow compilations from a major internal build target.
- The profile (csspgo) size is 774MB including 170K profiled functions and 80M samples.
- Run every compilation using either version for 5 runs and calculate the average.
- Report both instruction count (very low variance) and elapsed wall clock time (relatively high variance).
The result
- 0.02% less instructions from the `unordered_map` version.
- 1.2% less wall clock time from the `unordered_map` version.
We didn't measure the time spent within sample profile loader though, the above numbers are all e2e compilations.
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