Closed pdogr closed 2 years ago
Closed due to lack of benches. Will reopen this after adding a few benches.
There are a few existing benches here: https://github.com/michaelsproul/rust_radix_trie/tree/master/benches
I think you could just run them on the old vs the new.
Of course, more sophisticated benches would be great too!
Thanks!
Yes, I found these benches and the performance seems to be similar on them when comparing old vs new.
As the current benches only inserts string types, should we include other datatypes also in the benches?
Could do! Yeah, some byte-array like strings could be interesting. Another thing is that the real bottlenecks may not be the ones identified by the TODOs
Performance on removal did increase a bit but nothing significant.
This PR proposes a few optimizations based on comments in the code.
compute_size
with an iterative DFS.replace_value
to not check if the new_key is equal to the old_key at the node, as it is called only if eithernv.len() == 0
or match_keys returns aKeyMatch::Full
which implies that the compared keys match exactly.rec_remove
with an iterative version.