From d94b7a187685942579e7d7dc00bf58448cdafce8 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 7 Aug 2024 13:02:43 -0400 Subject: cmd/compile,internal/runtime/maps: add extendible hashing Extendible hashing splits a swisstable map into many swisstables. This keeps grow operations small. For #54766. Cq-Include-Trybots: luci.golang.try:gotip-linux-ppc64_power10,gotip-linux-amd64-longtest-swissmap Change-Id: Id91f34af9e686bf35eb8882ee479956ece89e821 Reviewed-on: https://go-review.googlesource.com/c/go/+/604936 Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI Reviewed-by: Keith Randall --- src/runtime/map_benchmark_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/runtime/map_benchmark_test.go') diff --git a/src/runtime/map_benchmark_test.go b/src/runtime/map_benchmark_test.go index 663abf6202..6f527c3af6 100644 --- a/src/runtime/map_benchmark_test.go +++ b/src/runtime/map_benchmark_test.go @@ -1008,11 +1008,12 @@ func benchmarkMapDelete[K mapBenchmarkKeyType, E mapBenchmarkElemType](b *testin for i := 0; i < b.N; i++ { if len(m) == 0 { - b.StopTimer() + // We'd like to StopTimer while refilling the map, but + // it is way too expensive and thus makes the benchmark + // take a long time. See https://go.dev/issue/20875. for j := range k { m[k[j]] = e[j] } - b.StartTimer() } delete(m, k[i%n]) } -- cgit v1.3-6-g1900