pola-rs / polars

Dataframes powered by a multithreaded, vectorized query engine, written in Rust
https://docs.pola.rs
Other
29.47k stars 1.87k forks source link

json_path extractor could do less heap allocs #1043

Open ritchie46 opened 3 years ago

ritchie46 commented 3 years ago

The dependency used to extract json paths does a vec and multiple string allocs per query. We could do a PR and improve their API. Allocations could be amortized.

Another useful feature would be a take similar to std::mem::take.

potter420 commented 3 years ago

Just to link here since it has been raised https://github.com/freestrings/jsonpath/issues/72

ritchie46 commented 3 years ago

@potter420, I saw that your forked. When I worked on this, I had quite a clear view how it could be improved, if you want any discussion on this, let me know.

potter420 commented 3 years ago

I'm quite new to Rust, and still trying to wrap my head around it. I forked to try to figure out something on my own for learning experience mostly. This lib seem to be teaching a lot about heap and stack allocation and when they should be used.

ghuls commented 3 years ago

It looks like the latest git version should do less allocations now.