Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

the doubling of the sizes is an issue. Yet, I'd consider all single threaded datastructures a non-issue. The hard part is multithreading.

Flip note: java's hashmap uses red/black tree for nodes when there are too many collisions (and the keys are Comparable)



but java's hashmap still resizes when breaching the loadfactor. so any similar implementation, even for singlethreaded cases can't achieve (soft)realtime. I am not aware of any linear hashing or similar approach for in memory hash tables to mitigate such latency spikes.


of course it does; it's possible to pre-allocate the entire table though (c-tor with size, rounded to the next power of 2, compensated by the load factor). Massive waste of memory but no resizes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: