Investigate potential alternative data structures for s.c.i.HashCollision{Map,Set}Node
#11164
Labels
Milestone
s.c.i.HashCollision{Map,Set}Node
#11164
Currently HashMapCollisionNodes use an underlying
Vector[(K, V)]
to represent a hash collision bucket. However, we can probably achieve better performance using a mutable data structure, which the builder can take advantage of during a build phase.The properties we are looking for are:
ArrayBuffer
inPlaceUpdateByKeyOrElseAdd(key: Key, value: Value): Unit
updateByKeyOrElseAdd(key: Key, value: Value): Unit
inPlaceRemoveByKey(key: Key): Unit
removeByKey(key: Key): Unit
I am personally leaning towards an unrolled linked list of some sort, since this would allow for very fast traversing, mutating, and prepending, as well as pretty-fast immutable updates, and very fast immutable prepends.
The text was updated successfully, but these errors were encountered: