dadhi / ImTools

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

Improve memory use by more dedicated Branch types up to 3 level tree #29

Closed dadhi closed 4 years ago

dadhi commented 4 years ago
5       Branch2
   \ 
    10

   5       Branch3
  /  \ 
1    10

    5       Branch4
  /  \ 
1    10
          \
          15

   5       Branch5
  /  \ 
1     10
       /  \
     7      15

   5       Branch6
  /  \ 
1      10
  \     /  \
   3  7    15

      5       Branch7
     /  \ 
  1      10
 / \      /  \
0  3   7    15
dadhi commented 4 years ago

on hold, ImMap234 is simplier and likely to replace current experimental ImMap