r @kyleheadley
(following the Rust github conventions for requesting a review from @kyleheadley)
modules trie1 and trie2 are two variants of hash tries, for representing finite maps computed from sequences. The second variant is a bit simpler, with comparable performance to the first. In a later PR, I'll probably remove the first one and rename.
Performance
The image below shows that at 100k random usizes, constructing a Rust hashmap requires ~400ms to build (on my mac book air). Meanwhile, it only takes 10ms to change propagate the trie construction algorithm after we edit the initial sequence.
To reproduce this, go into branch dev-hammer, under eval and do cargo run --example unique_elms. I suspect that a more powerful computer may have similar, but slightly better results overall.
Commit history
I accidentally included a few commits (from master) of @kyleheadley below. There's probably a way of correcting this, but it's easier just to recommit this time. I know what I did, and how to avoid it next time (always do git pull --rebase origin/master before doing a PR, and don't pull without rebasing).
Update: I think I fixed this by rebasing the PR to target dev, not `master.
This PR implements the first of the two finite map representations described in https://github.com/cuplv/iodyn.rust/issues/20.
r @kyleheadley (following the Rust github conventions for requesting a review from @kyleheadley)
modules
trie1
andtrie2
are two variants of hash tries, for representing finite maps computed from sequences. The second variant is a bit simpler, with comparable performance to the first. In a later PR, I'll probably remove the first one and rename.Performance
The image below shows that at 100k random
usize
s, constructing a Rust hashmap requires ~400ms to build (on my mac book air). Meanwhile, it only takes 10ms to change propagate the trie construction algorithm after we edit the initial sequence.To reproduce this, go into branch
dev-hammer
, undereval
and docargo run --example unique_elms
. I suspect that a more powerful computer may have similar, but slightly better results overall.Commit history
I accidentally included a few commits (from
master
) of @kyleheadley below. There's probably a way of correcting this, but it's easier just to recommit this time. I know what I did, and how to avoid it next time (always dogit pull --rebase origin/master
before doing a PR, and don't pull without rebasing).Update: I think I fixed this by rebasing the PR to target
dev
, not `master.