| ▲ | Intervaltree with Rust Back End(github.com) | |||||||||||||||||||||||||||||||||||||||||||
| 51 points by athekunal 4 days ago | 13 comments | ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | athekunal 4 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | everybodyknows 10 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
It would be helpful to indicate in the README.md which variant of the data structure is used: | ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | 2Pacalypse- a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
Pretty cool to have this in Rust, might be useful if/when I decide to move some functionality from TS -> Rust. In the meantime, I have this impelemented in TypeScript in case anyone else will find it useful: https://github.com/ShieldBattery/node-interval-tree | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | vswaroop04 a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
Pretty nice to have this in Rust could come in handy if I decide to migrate some functionality from TypeScript to Rust later on. | ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | jonstewart 21 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||
In C++ there’s the Boost Interval Container Library, which has an excellent API: https://www.boost.org/doc/libs/latest/libs/icl/doc/html/inde... 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. | ||||||||||||||||||||||||||||||||||||||||||||