michaelsproul / rust_radix_trie

Fast generic radix trie implemented in Rust
https://docs.rs/radix_trie/
MIT License
188 stars 33 forks source link

map_with_default encodes key twice #73

Open rbtcollins opened 1 year ago

rbtcollins commented 1 year ago

map_with_default calls self.get_mut and self.insert; both of these functions encode the key as the first thing they do : this means that mis-heavy workloads encode the key twice as often as there are actual API calls made to the trie.

related to #32 but distinct i think since they need to be fixed separately.