Re:A hash table by any other name
by kevincox on Saturday July 27, 2024 @06:50AM
(#41085694)
A JVM with a moving GC can have wildly difference performance characteristics than C. A moving collector can use a bump allocator which can result in these independently allocated chain nodes ending up adjacent in memory which will mitigate lots of the cache miss costs of linked hash tables. Especially in microbenchmarks where basically all allocations come from the hash table under measurement.
In C it is much more likely that these allocations are spread around memory and in different cache lines.
In C it is much more likely that these allocations are spread around memory and in different cache lines.