I've recently started using Folly's F14 hash map implementation (specifically, F14ValueMap--my keys and values are relatively compact) and it's the fastest unordered associative container I've yet found. This is for an application that repeatedly adds to and removes from the map. In particular, it's faster than a custom solution using open addressing that I had written that is pretty much optimal for this particular…
Have you compared to ska::flat_hash_map or khash? I’ve found the latter to be ideal if my keys/values were POD and the former otherwise. I’m not yet convinced that it’s actually better based on their website. std::unordered_map is infamously slow.
Open-sourcing F14 for memory-efficient hash tables
11–20 of 50 posts
Re: Open-sourcing F14 for memory-efficient hash tables
#12Hasn't this been open-sourced since at least last March? https://github.com/facebook/folly/commit/93d49bcf9a44d6b2d9c...
Re: Open-sourcing F14 for memory-efficient hash tables
#13I've recently started using Folly's F14 hash map implementation (specifically, F14ValueMap--my keys and values are relatively compact) and it's the fastest unordered associative container I've yet found. This is for an application that repeatedly adds to and removes from the map. In particular, it's faster than a custom solution using open addressing that I had written that is pretty much optimal for this particular…
Re: Open-sourcing F14 for memory-efficient hash tables
#14There was a discussion thread on here recently about Google's Hash Table implementation. I wonder how the approaches and design considerations compare to each other.
Both of them have two variants, one which guarantees that references to keys and values will remain valid even if iterators are invalidated, and another which is faster but iterator invalidation invalidates references to keys or values.
IMHO it looks like the Folly team saw the Abseil presentation last year and said, "That's a good idea, we should do that."
abseil presentation: https://www.youtube.com/watch?v=ncHmEUmJZf4 It's super interesting.
Re: Open-sourcing F14 for memory-efficient hash tables
#15There was a discussion thread on here recently about Google's Hash Table implementation. I wonder how the approaches and design considerations compare to each other.
Re: Open-sourcing F14 for memory-efficient hash tables
#16Earlier quoted context omitted.
Have you compared to ska::flat_hash_map or khash? I’ve found the latter to be ideal if my keys/values were POD and the former otherwise. I’m not yet convinced that it’s actually better based on their website. std::unordered_map is infamously slow.
I did look at klib about a year ago. Honestly I don't recall whether I looked at khash in particular; I know I was also considering some of the other klib stuff for other uses. I did use Google's dense_hash_map for a time. For my application, the problem with implementations that use more traditional tombstone algorithms is that removing items from the table doesn't decrease the load, so that at some point the entire…
Re: Open-sourcing F14 for memory-efficient hash tables
#17Hasn't this been open-sourced since at least last March? https://github.com/facebook/folly/commit/93d49bcf9a44d6b2d9c...
Re: Open-sourcing F14 for memory-efficient hash tables
#18Re: Open-sourcing F14 for memory-efficient hash tables
#19I'm curious what Rust's implementation looks like in comparison now...