ImTools icon indicating copy to clipboard operation
ImTools copied to clipboard

Fast mutable non-concurrent HashMap

Open dadhi opened this issue 2 years ago • 1 comments

I want a fast, configurable for the small sizes and less-allocating variant of HashMap in comparison with Dictionary and DictionarySlim.

Alternative implementation to look for and compare:

  • https://github.com/Wsm2110/Faster.Map
  • https://github.com/matthewcrews/FastDictionaryTest

Tasks:

  • [X] Implementation, tests and documentation
  • [x] Battle test in FastExpressionCompiler
  • [ ] Benchmarks in readme
  • [x] Establish a consistent naming across the other ImTools types, e.g. SmallMap vs FHashMap, EtcMap
  • [ ] Add the variant to keep an items on stack for the small map and progressively expand to the heap if needed. Ensure there is no "significant" performance degradation comparing to the full-on heap version

Results:

  • The new SmallMap hash table

dadhi avatar Aug 02 '23 17:08 dadhi

The work is done in the playground/Experiments project in the maps with the incremented names, last one at the moment is the FHashMap91.

dadhi avatar Aug 02 '23 17:08 dadhi