Any tips on how to implement a hashmap in C with (close to) zero collisions while not allocating much more space than necessary?
I’m new to this sort of stuff, so pardon my ignorance. Here is what I have so far: https://github.com/dannyvankooten/c-hashmap
It distributes pretty evenly, but in my example using ~45.000 dates keys about 19% share a spot with at least one other nose.
@dannySee this video about Google's SwissTable:https://www.youtube.com/watch?v=ncHmEUmJZf4&t=745
This is used in Rust standard library: https://doc.rust-lang.org/std/collections/struct.HashMap.html
@brombek Perfect, just the pointer I needed. Will look into it; thank you! 🙏
Fast, secure and up-to-date instance. PrivacyTools provides knowledge and tools to protect your privacy against global mass surveillance. Website: privacytools.io Matrix Chat: chat.privacytools.io Support us on OpenCollective, many contributions are tax deductible!
@brombek Perfect, just the pointer I needed. Will look into it; thank you! 🙏