diff --git a/src/testing/benchmark.go b/src/testing/benchmark.go index 3a7da9e540..6919341ef7 100644 --- a/src/testing/benchmark.go +++ b/src/testing/benchmark.go @@ -426,9 +426,9 @@ func (b *B) loopSlowPath() bool { // The compiler never optimizes away calls to functions within the body of a // "for b.Loop() { ... }" loop. This prevents surprises that can otherwise occur // if the compiler determines that the result of a benchmarked function is -// unused. The loop must be written in exactly this form, and this only applies -// to calls syntactically between the curly braces of the loop. Optimizations -// are performed as usual in any functions called by the loop. +// unused. The loop condition must be written in exactly as "b.Loop()", and this +// only applies to calls syntactically between the curly braces of the loop. +// Optimizations are performed as usual in any functions called by the loop. // // After Loop returns false, b.N contains the total number of iterations that // ran, so the benchmark may use b.N to compute other average metrics.