Skip to content
This repository has been archived by the owner on Sep 9, 2019. It is now read-only.

Use Hashmap instead of Map #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Use Hashmap instead of Map #19

wants to merge 1 commit into from

Conversation

hellerve
Copy link
Member

This PR implements an experimental migration from Haskell's Map (balanced binary tree) to a HashMap (Patricia tree) for hashmaps.

We should do some performance measurements to see how this a affects zepto's overall performance.

@hellerve
Copy link
Member Author

And, because I like Bagwell's data structure ideas, maybe it would also make sense to investigate a Hash Array Mapped Trie.

@hellerve hellerve changed the title use hashmap instead of map (implementation of complex is broken) Use Hashmap instead of Map Nov 18, 2016
@hellerve
Copy link
Member Author

I had an idea how to hash complex numbers yesterday evening. It might be a really bad idea, but maybe something like the following would work:

hash  = hash(imaginary) & hash(real)

I would think that the distribution of hashes is uniform, but I can't whip out a formal proof (mostly because I suck). Any comments regarding how my understanding is flawed or not are welcome.

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

Successfully merging this pull request may close these issues.

1 participant