CodSpeed v5 is out, now with more accurate cycle estimation and the ability to exclude allocators from the simulated execution ⚡
CodSpeed v5 is out, with two big changes to how we measure your code.
First, cycle estimation. Until now, every instruction was charged the same cost, but a `div` is ~25x more expensive than a `mov` on real hardware. We patched Callgrind to emit per-instruction metadata and built a cost model on top, weighting every instruction by its measured cost on real CPUs, cache misses included. Replacing a division with a multiply now shows up in your benchmarks the way it shows up in production. Just upgrade and you'll have it on by default.
Second, allocation exclusion. Allocators are non-deterministic by design: their cost depends on the OS, the implementation, the version. If you're optimizing your own code, that's pure noise. v5 tags every allocator frame in the call graph and subtracts its time from the reported value. The flamegraph still shows the frames, only the number changes. Opt in with the `exclude-allocations` flag.
Just upgrade your action to CodSpeedHQ/action@v5 and you're set.
Only your code, at its real cost 🚀