Open danieleades opened 3 years ago
you can check the bench here, if you're interested - https://github.com/danieleades/range-set/blob/bench-test/benches/comparison.rs
Thanks for the PRs! And I’ll take a look at your repo. I really made this for my project looking at the Collatz conjecture and haven’t looked back. 😂
hi there! i wrote a similar crate to explore using a
BTreeMap
as an alternative backend for storing ranges to aVec
. A very quick and dirty set of benchmarks shows that for smaller sets the vector is more efficient, but for larger sets the map is more efficient. makes sense. lookup times scale linearly with the vector, but are close to constant with the map.I've not done enough investigation to know when the two regimes cross over (there's a couple of variables, how many values are inserted and how contiguous they are). I wanted to gauge if there was an interest in making the storage swappable?