dadhi / ImTools

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

Benchmark hybrid immutable array of ImHashMaps #19

Closed dadhi closed 5 years ago

dadhi commented 5 years ago

The array will represent a root of data structure to do a initial lookup by hash & (arrLength - 1) where arrLength is power of 2.

The array item would be an Im(Hash)Map tree.

Space saving here:

  1. Hamt root array.
  2. The part of hash used for array reuse for storing the height.
dadhi commented 5 years ago

Benchmarks are added to the readme.

Btw, No space saving, just reusing the full ImHashMap.