Shard your locks: benchmarking 6 Go cache designs (opens in new tab)
I built the same in-memory cache six ways with the Go standard library and benchmarked them across read/write mixes and core counts. Lock striping wins by up to 8×, sync.RWMutex turns out to be a trap, and one design gets slower the more cores you add.
Read the original article