From 54455839b674f980fb6c3afceb433db4833d340e Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Wed, 26 Jul 2023 07:00:15 +0800 Subject: [PATCH] add --- src/runtime/map_benchmark_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/runtime/map_benchmark_test.go b/src/runtime/map_benchmark_test.go index c928fb78bcc..ef0747fcd8f 100644 --- a/src/runtime/map_benchmark_test.go +++ b/src/runtime/map_benchmark_test.go @@ -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) } }) }