8ef3e22719
Use sync:1️⃣:Once to fetch the mach_timebase_info only once when running precise_time_ns(). This helps because mach_timebase_info() is surprisingly inefficient. Also fix the order of operations when applying the timebase to the mach absolute time value. This improves the time on my machine from ``` test tests::bench_precise_time_ns ... bench: 157 ns/iter (+/- 4) ``` to ``` test tests::bench_precise_time_ns ... bench: 38 ns/iter (+/- 3) ``` and it will get even faster once #14174 lands. |
||
---|---|---|
.. | ||
clean.mk | ||
crates.mk | ||
ctags.mk | ||
dist.mk | ||
docs.mk | ||
host.mk | ||
install.mk | ||
llvm.mk | ||
main.mk | ||
perf.mk | ||
platform.mk | ||
prepare.mk | ||
reconfig.mk | ||
rt.mk | ||
rustllvm.mk | ||
snap.mk | ||
stage0.mk | ||
target.mk | ||
tests.mk | ||
util.mk |