mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-26 03:16:58 +08:00
fix: make the iteration time same
This commit is contained in:
parent
ab425833b5
commit
a66f6e7bb0
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ func BenchmarkSum8(b *testing.B) {
|
||||||
var local int64
|
var local int64
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
b.StopTimer()
|
b.StopTimer()
|
||||||
s := make([]int64, 1_000_000)
|
s := make([]int64, 4_000_000)
|
||||||
b.StartTimer()
|
b.StartTimer()
|
||||||
local = sum8(s)
|
local = sum8(s)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue