Live data from Hacker News

Show HN: Integer Map Data Structure

github.com

1–10 of 28 posts

Show HN: Integer Map Data Structure

#1
This project presents a new data structure for storing ordered integer maps. The proposed data structure is a compressive, cache-friendly, radix tree that has performance comparable to an unordered map (`std::unordered_map`) and is an order of magnitude faster than an ordered map (`std::map`).

Show HN: Integer Map Data Structure
github.com

Re: Show HN: Integer Map Data Structure

#5
post #3

Neat, thank you! I'd love to see how it compares to the libgdx IntMap[0]. [0] https://github.com/libgdx/libgdx/blob/master/gdx/src/com/bad...

This is a radix tree (ordered, does more allocations), that is a hash table. Also TFA is C/C++, libgdx looks like Java.

Re: Show HN: Integer Map Data Structure

#6
Looks rad, I was going to look into some b-trees for a use-case where I need an ordered map of things similar to integers and this might be better.

I couldn't immediately see, is there mention of whether insertions invalidate iterators? Maybe not strictly needed for my use-case but good to know.

Re: Show HN: Integer Map Data Structure

#7
post #5
post #3

Neat, thank you! I'd love to see how it compares to the libgdx IntMap[0]. [0] https://github.com/libgdx/libgdx/blob/master/gdx/src/com/bad...

This is a radix tree (ordered, does more allocations), that is a hash table. Also TFA is C/C++, libgdx looks like Java.

yeah, just thought it'd be fun to compare :) ordered is a big difference.

Re: Show HN: Integer Map Data Structure

#10
This really doesn't seem to be comparing to comparable data structures. For int map specializations like this, the optimized alternatives are things like Judy (which is looking quite aged these days) or roaring bitmaps, not to mention that any C++ developer using "ordinary" maps will be using absl's SwissTable (flat_hash_map) or folly's F14 (F14FastMap) or perhaps absl::btree_map if order is important. Comparisons to std::map and std::unordered_map are simply too naive to make the case for this data structure.
Post reply on HN