3 ms·
I don't think that is correct. Do you have a link to more information about it. When writing benchmarks in Go you always need to take steps to circumvent the o
by iand 9y ago
I don't think that is correct. Do you have a link to more information about it.
When writing benchmarks in Go you always need to take steps to circumvent the optimizer detecting functions with no side effects. Assigning the result of a benchmark to a public package level variable is usually enough.
- cormacrelf 9y agoAs in Rust, which has a test::black_box, which is unintelligible to the optimizer.