News for hackers. Stuff that matters.
Re:Analyzing Data 180,000x Faster with Rust by wenc on Saturday October 21, 2023 @01:33AM (#37964347)
Pandas can be pretty fast, but DuckDB and Polars are both faster than Pandas. DuckDB supports vectorized and parallelized operations on Pandas dataframes, while Polars is written in Rust.

I feel though the killer is that inner loop where dataframe operations are being performed across a large number of iterations, and there's significant overhead there.

For-loops are usually not the most performant solution in Python.

I could be wrong, I feel that there's a SQL way to answer that question, in which case DuckDB might be able to exploit vectorization, parallelization, indexing and query optimization across the dataset in one fell swoop.

Re:Analyzing Data 180,000x Faster with Rust by twelvechairs on Saturday October 21, 2023 @02:31AM (#37964588)
Numba is another excellent Python option for speedier python solutions
Re:Analyzing Data 180,000x Faster with Rust by eskaytwo on Saturday October 21, 2023 @03:52AM (#37964932)
DuckDB can also operate on Polars data frames, and return the results to Polars data frames.