Skip to content

v3.1.1: fix: increase performance test tolerance to prevent flaky failures (#64)

Latest

Choose a tag to compare

@elliotchance elliotchance released this 11 Jul 22:17
52e7d06
The O(1) performance assertions used a tolerance of 0.5x the
baseline (res1.NsPerOp), which is too tight on faster runtimes
like Go 1.24 where absolute timings are smaller and GC/scheduler
variance is relatively larger.

Increase tolerance to 1.0x the baseline, which still validates
O(1) behavior (res4 should be within 2x of res1) while being
robust against benchmark noise.

Fixes #61