[llvm] [ADT] Extract DenseMapStorage from DenseMap (NFC) (PR #226664)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 27 17:52:45 PDT 2026
kazutakahirata wrote:
@MaskRay Yes, the compilation time increase with the host compiler is temporary. I've also observed about a 0.65% to 0.97% increase in retired instructions depending on whether I use `-O0` or `-O3`. The compilation time goes down (and `DenseMap.h` shrinks by 67 lines net relative to `main`) after I remove CRTP.
### `-O0`
| Metric | `Metadata.mid.ii` | `Metadata.test.ii` |
| :--- | ---: | ---: |
| `instructions:u` | +0.97% | -0.32% |
| `cpu-cycles:u` | +0.42% | -0.52% |
| `time elapsed` | +0.57% | -0.15% |
### `-O3`
| Metric | `Metadata.mid.ii` | `Metadata.test.ii` |
| :--- | ---: | ---: |
| `instructions:u` | +0.65% | -0.38% |
| `cpu-cycles:u` | +0.70% | -0.33% |
| `time elapsed` | +0.83% | -0.06% |
- `Metadata.mid.ii`: The preprocessed version of `Metadata.cpp` with this patch.
- `Metadata.test.ii`: The preprocessed version of `Metadata.cpp` with the CRTP removed.
- All relative to `Metadata.base.ii`, the preprocessed version of `Metadata.cpp` without this patch.
- All run 3 times each on a stabilized physical x86 machine.
https://github.com/llvm/llvm-project/pull/226664
More information about the llvm-commits
mailing list