about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-10 08:59:08 +0000
committerbors <bors@rust-lang.org>2024-05-10 08:59:08 +0000
commite93f34210120d1fc6a0195d527eee828a36e57b1 (patch)
tree276e29caddbc4b3116b4843f085d90315f9abedf /compiler/rustc_codegen_llvm/src
parentf7b1501ce7e63a53b36f9d6d01b939eef6602d42 (diff)
parent2a7c42f93c2e3e3c07a8cae6453e4c7626e83b51 (diff)
downloadrust-e93f34210120d1fc6a0195d527eee828a36e57b1.tar.gz
rust-e93f34210120d1fc6a0195d527eee828a36e57b1.zip
Auto merge of #124774 - the8472:subnanosecond-benches, r=jhpratt
Display walltime benchmarks with subnanosecond precision

With modern CPUs running at more than one cycle per nanosecond the current precision is insufficient to resolve differences worth several cycles per iteration.

Granted, walltime benchmarks often are noisy but occasionally, especially when no allocations are involved, the difference really is just a few cycles.

example results when benchmarking 1-4 serialized ADD instructions and an empty bench body

```
running 4 tests
test add  ... bench:           0.24 ns/iter (+/- 0.00)
test add2 ... bench:           0.48 ns/iter (+/- 0.01)
test add3 ... bench:           0.72 ns/iter (+/- 0.01)
test add4 ... bench:           0.96 ns/iter (+/- 0.01)
test empty ... bench:           0.24 ns/iter (+/- 0.00)
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions