I built a project that implemented intervaltree in Rust and exposed PyO3 bindings as a drop-in replacement for Python's native intervaltree. It is significantly faster, and I will be adding more features, such as AVL and red-black trees for balancing.
And with a little work you can even use them to map ranges of keys to values in a way that's reminiscent of interval trees — e.g. https://crates.io/crates/rangemap. (Disclosure: that's my crate.)
Nice! I was only suggesting considering BTrees because they also play nice with caches, instead of the more conventional binary tree balancing mechanisms.
Unfortunately it’s implemented on top of std::set/std::map and I’ve had problems with heap blow up on large maps. This project looks like it uses 32 bit indices into a vector for backing store.
1: https://pypi.org/project/intervaltree/
https://en.wikipedia.org/wiki/Interval_tree
In the meantime, I have this impelemented in TypeScript in case anyone else will find it useful: https://github.com/ShieldBattery/node-interval-tree
Plus, the account of the one you're linking to only has that one comment in their comment history. So I think the shenanigans lie there
Unfortunately it’s implemented on top of std::set/std::map and I’ve had problems with heap blow up on large maps. This project looks like it uses 32 bit indices into a vector for backing store.