Hacker Newsnew | past | comments | ask | show | jobs | submit | athekunal's commentslogin

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.


If you want balanced trees, have a look at what Rust's standard library does with BTreeMap.


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.


I love that crate! Kudos


What is the native intervaltree, is it [1] you mean? Do you also support the set operations? And can it be pickled safely?

1: https://pypi.org/project/intervaltree/


Will you publish it as a crate too?


Hi everyone I wanted to share this project that I am currently building, where I am building a hierarchical graph structure for the documentations of different packages. The function discovery part in function calling is the trickiest part as just dense retrieval won't help a lot. Rather we can build all the documentation into a hierarchical graph, and based on the function definitions, we can jump to the nodes that are relevant and narrow down our search space. I am hoping to brainstorm more about it and currently, it supports sklearn, pandas, and OpenBB. Working on huggingface and Ray.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: