Open
Description
Related Epic: #2308
CompressedHAMP is designed to provide a smaller footprint and better cache locality than standard HAMT which features one array encoding both sub-node references and data values.
To improve things we can split the array into two dedicated ones: one for values, and one for sub-node references and use two 32-bit bitmaps.
Another idea to explore is if it would make sense to give up physical tree structure in favor of logical with one array backing the whole map. Would allow decreasing pointer chasing but would penalize modifications.
We should follow up and investigate if it makes sense to do the same move as Scala did in 2.13.
scala/collection-strawman#192
scala/scala@d5ae93e
References: