From fcdfc69a041258d6c9ccb1a5e8d70bd0c212e17d Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Fri, 13 Dec 2024 23:11:44 +0000 Subject: _content/doc/go1.24: clarify sync.Map improvements The improvements are primarily about contention under certain circumstances. Modifications to the map improved the most. Change-Id: I9e43dab9bb3645ee237bbd263a68a2c1aa0950a7 Reviewed-on: https://go-review.googlesource.com/c/website/+/635858 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Pratt --- _content/doc/go1.24.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/_content/doc/go1.24.md b/_content/doc/go1.24.md index eea2314d..81307d33 100644 --- a/_content/doc/go1.24.md +++ b/_content/doc/go1.24.md @@ -721,8 +721,12 @@ The [`strings`](/pkg/strings) package adds several functions that work with iter #### [`sync`](/pkg/sync/) -The implementation of [`sync.Map`](/pkg/sync#Map) has been changed, improving overall performance -and resolving some long-standing issues. +The implementation of [`sync.Map`](/pkg/sync#Map) has been changed, improving performance, +particularly for map modifications. +For instance, modifications of disjoint sets of keys are much less likely to contend on +larger maps, and there is no longer any ramp-up time required to achieve low-contention +loads from the map. + If you encounter any problems, set `GOEXPERIMENT=nosynchashtriemap` at build time to switch back to the old implementation and please [file an issue](/issue/new). -- cgit v1.3