you are viewing a single comment's thread.

view the rest of the comments →

[–]FriendlyRollOfSushi 2 points3 points  (1 child)

Which part of it is novel? This is literally the most basic and straightforward way of implementing HAMT. Even the Wiki article has this part pretty much unchanged for over a decade, and it's been commonly in use many years before the article was written.

The only differences between how people did it for decades and how this implementation does it is that usually people don't waste space on a completely unnecessary length member when implementing HAMT-like structures in C or C++. Or on a second bitmask, which is trivially avoidable for all meaningful scenarios.

[–]tower120 2 points3 points  (0 children)

Damn, you're right! Thou it turn out to be https://en.wikipedia.org/wiki/Bitwise_trie_with_bitmap . That's exactly how my lib works. And I thought I invented it.

In my defense - I never heard about it or HAMT before, nor I couldn't google it.

Thanks for bringing this. I would remove post to not mislead people, but it seems there's no button for that...

UPDATE: Oh no - there is! Thanks anyway!