aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2024-08-16 15:13:52 +0000
committerGopher Robot <gobot@golang.org>2024-11-18 20:35:39 +0000
commit06e6b8efa4c9fbe4b8ceec8c655011117a50279a (patch)
treee697f72cdb720dfcd30c46a8deefa3af1e7b2a87 /src/sync
parent50f1888814e2a72cb368c145a0d1c2f3af7a2f05 (diff)
downloadgo-06e6b8efa4c9fbe4b8ceec8c655011117a50279a.tar.xz
internal/sync: optimize CompareAndSwap and Swap
We observe the CompareAndSwap and Swap can both be substantially faster if the value in each entry node is mutable. This change modifies the map entry node to store the value indirectly, allowing us to perform swaps for existing nodes and compare-and-swaps without taking the parent node's lock. Change-Id: I371343aa81a843d3a7e6bc5ac87b8a96c12ca3a8 Reviewed-on: https://go-review.googlesource.com/c/go/+/606462 Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/sync')
0 files changed, 0 insertions, 0 deletions