-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I am concerned about the accuracy of benchmarks for extremely fast operations. The branching instructions in the for loop inside root.zig consume cycles that are currently included in the measurement.
nanobench handles this by running a calibration step. It measures an empty loop and subtracts that overhead from the final results.
It would be great to implement a similar calibration phase:
// measure empty loop cost
const overhead = try measureEmpty(batch_size);
// run actual benchmark
const total = try measureFn(batch_size);
// adjust result
const actual = total - overhead;Metadata
Metadata
Assignees
Labels
No labels