leafless PersistentHashMap

6 views
Skip to first unread message

Christophe Grand

unread,
Aug 24, 2009, 10:48:35 AM8/24/09
to cloju...@googlegroups.com
Hi Rich,

Here is a short summary of my current work on leafless PersistentHashMap:

* ArrayNodes aren't leafless (but statistically don't need to).
* BitmapNodes are leafless, if the key slot is nil, the value is a node (nil-as-key is handled at the root).
* HashCollisionNodes are leafless too.

when a bitmap node is half full it becomes an array node
when an array node is 3/4 empty it becomes a bitmap node

when used in a transient context, bitmap nodes provision room for the next key-value pair.

I haven't tried to use two arrays in leafless nodes.

Christophe

Rich Hickey

unread,
Aug 26, 2009, 10:05:35 AM8/26/09
to cloju...@googlegroups.com

Looks good, I've attached a couple of perf tweaks.

Thanks for tackling this!

Rich

leafless-map-tweaks.diff
Reply all
Reply to author
Forward
0 new messages