Re:Compilers Are (Too) Smart
by swiftcoder on Sunday June 09, 2024 @04:17AM
(#40622833)
Worth noting that this issue is not unique to the C++ standard library either. Java is saddled with an overly-general HashMap implementation with awful worst-case performance characteristics as well, and older versions of Rust's HashMap had performance problems as well (though these have mostly been addressed).
[ Parent
| on HN ]
Re:Compilers Are (Too) Smart
by LgWoodenBadger on Monday June 10, 2024 @01:48PM
(#40636111)
But Java has ConcurrentHashMap as a drop-in replacement that is better in every way
Re:Compilers Are (Too) Smart
by swiftcoder on Tuesday June 11, 2024 @03:48AM
(#40643664)
ConcurrentHashMap is more performant in multi-threaded scenarios (it takes a performance hit versus the regular HashMap when single-threaded). Apart from that, it is fairly similar, and doesn't address the ridiculous rate of cache misses at all