[libcxx-commits] [PATCH] D89110: [libcxx][dsl] Reduce number of feature checks
Alexander Richardson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Oct 10 05:40:49 PDT 2020
arichardson added a comment.
In D89110#2322098 <https://reviews.llvm.org/D89110#2322098>, @ldionne wrote:
> What's the time gain like for doing this?
Measuring with perf on a Linux machine I get the following without (rG0db08e59c9d2d3b004ea61f96d823edff283ed25 <https://reviews.llvm.org/rG0db08e59c9d2d3b004ea61f96d823edff283ed25>):
Performance counter stats for './bin/llvm-lit -v --no-execute projects/libcxx/test/libcxx/selftest/dsl/' (10 runs):
3001.646813 task-clock (msec) # 0.971 CPUs utilized ( +- 0.68% )
530 context-switches # 0.177 K/sec ( +- 0.20% )
37 cpu-migrations # 0.012 K/sec ( +- 8.62% )
223,059 page-faults # 0.074 M/sec ( +- 0.01% )
5,421,406,209 cycles # 1.806 GHz ( +- 0.26% )
5,856,892,943 instructions # 1.08 insn per cycle ( +- 0.01% )
1,168,779,209 branches # 389.379 M/sec ( +- 0.01% )
30,692,873 branch-misses # 2.63% of all branches ( +- 0.02% )
3.091204859 seconds time elapsed ( +- 0.72% )
And the following with the patch:
Performance counter stats for './bin/llvm-lit -v --no-execute projects/libcxx/test/libcxx/selftest/dsl/' (10 runs):
2833.725264 task-clock (msec) # 0.968 CPUs utilized ( +- 0.62% )
503 context-switches # 0.178 K/sec ( +- 0.42% )
29 cpu-migrations # 0.010 K/sec ( +- 12.05% )
208,416 page-faults # 0.074 M/sec ( +- 0.01% )
5,135,758,720 cycles # 1.812 GHz ( +- 0.20% )
5,564,092,379 instructions # 1.08 insn per cycle ( +- 0.01% )
1,112,432,802 branches # 392.569 M/sec ( +- 0.01% )
29,604,154 branch-misses # 2.66% of all branches ( +- 0.04% )
2.928603087 seconds time elapsed ( +- 0.70% )
So almost 200ms here. The difference is probably bigger because the first measurements had my locale detection changes applied and this one didn't.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89110/new/
https://reviews.llvm.org/D89110
More information about the libcxx-commits
mailing list