Eliminating A Source of Measurement Errors in Benchmarks
About six months ago, I did a presentation that talks about how to conduct reliable benchmarking in Go. Recently, I submitted an issue #41641 to the Go project, which is also a subtle problem that you might need to address in some cases.
The issue is all about the following code snippet:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 func BenchmarkAtomic(b *testing.