Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: Implement CHAMP for increased performance. #63

Open
NodeGuy opened this issue Oct 25, 2017 · 3 comments
Open

feature request: Implement CHAMP for increased performance. #63

NodeGuy opened this issue Oct 25, 2017 · 3 comments

Comments

@NodeGuy
Copy link

NodeGuy commented Oct 25, 2017

CHAMP (Compressed Hash-Array Mapped Prefix-tree) is an incremental improvement over HAMT that simplifies the code, decreases the memory footprint, and increases performance.

Leveling up Clojure’s Hash Maps is an easily accessible introduction to it by the guy who replaced Clojure(Script)'s HAMT implementation with it.

The original paper: Optimizing Hash-Array Mapped Tries for Fast and Lean Immutable JVM Collections

The reference implementation in Java: The Capsule Hash Trie Collections Library

The Clojure implementation in Java and ClojureScript implementations look more easily grokkable to me.

@axefrog
Copy link
Member

axefrog commented Oct 25, 2017

Thanks for the link David, I'll definitely file that away for future upgrades!

@wishfoundry
Copy link

wishfoundry commented Nov 8, 2017

just as an FYI, I've attempted a similar effort in porting CHAMP to JS over here

I'm still spinning out variants and comparing benchmarks, but in general these tend to have faster writes with slightly slower reads available HAMT libs in JS today. Unlike what the article claims, there's no magic 5x faster though I'm afraid, maybe 50% faster writes, and 5% slower reads

@NodeGuy
Copy link
Author

NodeGuy commented Nov 18, 2017

Huh. That's disappointing. Thanks for sharing your experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants