mirror of
https://github.com/golang/go
synced 2024-11-27 01:31:21 -07:00
add
This commit is contained in:
parent
42b6dfa639
commit
54455839b6
@ -440,10 +440,7 @@ func BenchmarkGoMapClear(b *testing.B) {
|
||||
m := make(map[float64]int, size)
|
||||
for i := 0; i < b.N; i++ {
|
||||
m[1.0] = size // Add one element so len(m) != 0 avoiding fast paths.
|
||||
for k := range m {
|
||||
delete(m, k)
|
||||
}
|
||||
// clear(m)
|
||||
clear(m)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user