Live data from Hacker News

Recent adventures in performance optimization with Rust

willcrichton.net

1–10 of 75 posts

Re: Recent adventures in performance optimization with Rust

#2
> the point of this post isn’t to compare highly-optimized Python to highly-optimized Rust. The point is to compare “standard-Jupyter-notebook” Python to highly-optimized Rust.

I guess the title gets clicks, but I'm curious how good python gets. I'm under the impression pandas is pretty fast despite it being python

Re: Recent adventures in performance optimization with Rust

#3
post #2

> the point of this post isn’t to compare highly-optimized Python to highly-optimized Rust. The point is to compare “standard-Jupyter-notebook” Python to highly-optimized Rust. I guess the title gets clicks, but I'm curious how good python gets. I'm under the impression pandas is pretty fast despite it being python

I would also be curious given the Rust implementation gets a decent amount of iteration - 30x faster natively though aint bad.

Re: Recent adventures in performance optimization with Rust

#4
post #2

> the point of this post isn’t to compare highly-optimized Python to highly-optimized Rust. The point is to compare “standard-Jupyter-notebook” Python to highly-optimized Rust. I guess the title gets clicks, but I'm curious how good python gets. I'm under the impression pandas is pretty fast despite it being python

Pandas is ok for numerical, but Polars (rust-based) is absolutely the way to go for big datasets. The article is fascinating if you're a Python developer and you need to stray off the path of things Polars can do.

Re: Recent adventures in performance optimization with Rust

#6
post #2

> the point of this post isn’t to compare highly-optimized Python to highly-optimized Rust. The point is to compare “standard-Jupyter-notebook” Python to highly-optimized Rust. I guess the title gets clicks, but I'm curious how good python gets. I'm under the impression pandas is pretty fast despite it being python

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: Recent adventures in performance optimization with Rust

#7
post #2

> the point of this post isn’t to compare highly-optimized Python to highly-optimized Rust. The point is to compare “standard-Jupyter-notebook” Python to highly-optimized Rust. I guess the title gets clicks, but I'm curious how good python gets. I'm under the impression pandas is pretty fast despite it being python

I like Python too but let's face it, it is not performant. Why do we have to pretend otherwise?
Post reply on HN