diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go index ebb3e04461..772f5c7de5 100644 --- a/cmd/evm/runner.go +++ b/cmd/evm/runner.go @@ -158,7 +158,7 @@ func timedExec(bench bool, execFunc func() ([]byte, uint64, error)) ([]byte, exe // Do one warm-up run output, gasUsed, err := execFunc() result := testing.Benchmark(func(b *testing.B) { - for i := 0; i < b.N; i++ { + for b.Loop() { haveOutput, haveGasUsed, haveErr := execFunc() if !bytes.Equal(haveOutput, output) { panic(fmt.Sprintf("output differs\nhave %x\nwant %x\n", haveOutput, output))