dadhi / ImTools

Fast and memory-efficient immutable collections and helper data structures
MIT License
232 stars 10 forks source link

Try append-only hash-map as a tree stored in unrolled linked list #31

Open dadhi opened 4 years ago

dadhi commented 4 years ago

I think we don't even need an unrolled list for the ever-growing structure - just a bucketed list would be fine. It also will save the space and No need for complex buckets copy strategies on grow.

Why to use tree instead of linear probing hash table for instance. Because for the hash table we need to know the size beforehand to calculate the entry position. For tree we don't need it and just add the buckets.