4 ms·
I was interested in this as well, and yes ReadWriteLocks are horrible[0]. Just using synchronized is a good default that performs well in most scenarios, Stampe
by MrBuddyCasino 7y ago
I was interested in this as well, and yes ReadWriteLocks are horrible[0]. Just using synchronized is a good default that performs well in most scenarios, StampedLocks are good too.
[0] https://blog.overops.com/java-8-stampedlocks-vs-readwritelocks-and-synchronized/ https://blog.overops.com/java-8-stampedlocks-vs-readwriteloc...
- xxs 7y agoAbout the blog - testing with more threads than cores could be quite misleading, also testing on dual/quad socket vs single one exhibits the effects on coherency traffic a lot more (compared to L3 talk)