mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
e93f342101
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) ``` |
||
---|---|---|
.. | ||
alloc | ||
backtrace@e151306182 | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@c0257c1660 | ||
sysroot | ||
test | ||
unwind |