Skip to content

[Proposal] Use Bitmapped Vector Tries for ImmutableList #25775

@stevenguh

Description

@stevenguh

I'm wondering why aren't we using bitmapped Vector Tries for ImmutableList? Forgive me if this question has been asked.

As far as I know, this data structure is used in Closure's PersistentVector, and ImmutableJS's List. I have a preliminary implementation and it shows that it's faster than the current implementation of the current ImmutableList. For getting sequential or random elements in the list, the trie is about 4 times faster, and for adding elements, it about 3 times faster. Of course, these numbers are the preliminary findings.

For those who don't know what Bitmapped Vector Tries is:
Understanding Clojure's Persistent Vectors
Immutable.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.CollectionsenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions