4 ms·
Probably the same with any other locked data structure vs. structure using atomic ops. If you have read-heavy workload, especially one that does batching then g
by the8472 9y ago
Probably the same with any other locked data structure vs. structure using atomic ops. If you have read-heavy workload, especially one that does batching then grabbing a read-lock once and executing your batches before releasing it can be faster than lots of reads on a current map. Especially on weakly ordered architectures where the ordered reads may cost you performance.
- helper 9y agoThat makes sense. I was hoping someone would have some concrete benchmarks for different access patterns but I don't see any in the github issue[1]. [1]: https://github.com/golang/go/issues/18177 https://github.com/golang/go/issues/18177
- deleted 9y ago[deleted]