Is there a common way to do sharded read-write locks now? I mean faster than sync.RWMutex.
I tried https://github.com/jonhoo/drwmutex which is from quite a while back... ...and it was pretty good! reducing L1 cache misses (perf measured) by a little over 1% was enough to make the benchmark code run 6x faster on a 48 core machine. Just wondering if there are any other approaches in use today? That one needs a regular checking of which cpu your code is running on to assign the read-write lock, and its not clear to me how best to do that... apparently the check is somewhat costly (slow) so you'd rather not do it too often. I suppose I could sample at runtime and try to determine the distribution of thread switching times and check after the 2%-ile time had passed... but I'd rather have a more reliable method than such a heuristic. Thanks for any ideas! A 6x speedup is worth chasing to me... Jason -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/3ac3d800-a47c-4847-a420-3ceb96ca59a5n%40googlegroups.com.