4 ms·
They're really not though. Java has ConcurrentHashMap and isn't slow. Clojure has its persistent HashMap and it isn't slow. Scala has, TWO (?) concurrent hash m
by grabcocque 11y ago
They're really not though. Java has ConcurrentHashMap and isn't slow. Clojure has its persistent HashMap and it isn't slow. Scala has, TWO (?) concurrent hash maps in its core and neither is slow.
You know, two thirds of the way through the second decade of the 21st century, it's okay to spend a few cycles not corrupting your data structures.
- alkonaut 11y agoThere are both memory and performance considerations. For a server/db web application this may not be a problem, but for e.g. some logic in a game engine that runs every frame on a mobile device, then using 16 extra locks per map for example isn't a good idea. Nor is having 5% performance overhead. I can agree with an argument that thread-safe should be default and specialized/fast collections should be optional though.
- astrafoo 11y agoPeople who care about 5% performance overhead will never use Go in the first place.
- alkonaut 11y agoThat's just not true. Regardless of language there is always a portion of the code where you need to be careful with performance. I have spent endless hours tweaking map performance in .NET, for example.