diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2024-12-13 23:11:44 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2024-12-13 18:47:46 -0800 |
| commit | fcdfc69a041258d6c9ccb1a5e8d70bd0c212e17d (patch) | |
| tree | 6587eb7b8c133a0d1e2e4f94592965f71b28bdf8 | |
| parent | 37c81152904695d19f38106388a07c6e6ec9024f (diff) | |
| download | go-x-website-fcdfc69a041258d6c9ccb1a5e8d70bd0c212e17d.tar.xz | |
_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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
| -rw-r--r-- | _content/doc/go1.24.md | 8 |
1 files 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). |
