News for hackers. Stuff that matters.
Re:Lockless Algorithms for Mere Mortals by molodec on Wednesday July 29, 2020 @10:46PM (#23993970)
Can you elaborate on the HashMap? I have used java.util.concurrent.ConcurrentHashMap for caches on machines with up to 16 cores. I am actually very impressed by the implementation every time I use it. Easy to use, and the performance is excellent. I've never had a chance to use it on 128 core machine, and may be my experience is limited, but I think that for the majority of use cases using ConcurrentHashMap for caches is a solid choice.
Re:Lockless Algorithms for Mere Mortals by dastbe on Thursday July 30, 2020 @12:31AM (#23994700)
unless I'm misunderstanding terribly, the issue is that an LRU cache is composed of both a list of ordered cache entries and the map of data itself. Converting just the map to a threadsafe implementation doesn't actually fix the thread safety issues.