Skip to content

v1.2.1

Latest

Choose a tag to compare

@orca-zhang orca-zhang released this 19 Nov 03:10

Separate independent shard mutexes onto architecture-sized cache lines to reduce false sharing under concurrent access. The final lock stride is 128 bytes on arm64 and 64 bytes on amd64; APIs and cache behavior are unchanged. Go 1.22 remains supported.

On Apple M4 Pro, five paired microbenchmark runs compared with v1.2.0 show random string-key hits at 4 CPUs improving 3.12× and at 8 CPUs improving 2.53×, with zero allocations per hit. Benefits depend on the workload. On arm64 the lock storage increases by 120 bytes per shard.

Validation: complete existing local cache/stats/distribution tests, targeted race checks, Go 1.22 cross-builds, all three Redis-adapter tests against local Redis, and go vet passed.

Implementation and full before/after results