From the course: Using Rust with Python
Unlock this course with a free trial
Join today to access over 23,200 courses taught by industry experts.
Polars criterion benchmarking - Rust Tutorial
From the course: Using Rust with Python
Polars criterion benchmarking
- [Instructor] Here we have a Rust Polars project that includes a bunch of different things. In this case though, I'm going to focus on benchmarking and we're going to do a couple different kinds of benchmarking. First, I'm going to benchmark Python versus Rust, using the same interface and also a Pandas based interface. And then I'm also going to bring it out into a more granular level and use a benchmark for a library called Criterion, which goes through and does a bunch of profiling on the code. So let's go ahead and take a look at the code here. First step, I have this Polars Python Rust project. And inside a few things to look at. First step, I have a main file here that goes through and does some operations, including aggregation group by, et cetera. I've done something pretty similar in Pandas here, where I also do some group by operations. And then I also do a Python based approach as well using the Polars library. So really we have a few different flavors to test. Now, what's…
Contents
-
-
Introduction: Instructor45s
-
Introduction: Rust and Python5m
-
PyO3 installation4m 15s
-
(Locked)
Basic Rust library4m 46s
-
(Locked)
Rust to Python3m 33s
-
(Locked)
Rust ownership model4m 59s
-
(Locked)
Diagram of a PyO3 project3m 40s
-
(Locked)
Python calculator CLI3m 54s
-
(Locked)
PyO3 features2m 38s
-
(Locked)
PyO3 exceptions4m 21s
-
(Locked)
Call Python from Rust5m 53s
-
(Locked)
Run Python with embedded Rust4m 47s
-
(Locked)
Embedded Rust CLI diagram3m 34s
-
(Locked)
Embedded Rust CLI4m 31s
-
(Locked)
Embedded Rust CLI test4m 59s
-
(Locked)
Rust-built Python tools3m 52s
-
(Locked)
Using the Rust Ruff linter5m 15s
-
(Locked)
Using Polars in Python with Rust4m 9s
-
(Locked)
Polars CLI in Rust4m
-
(Locked)
Polars CLI test in Rust4m 21s
-
(Locked)
Polars CLI integration test3m 29s
-
(Locked)
Polars criterion benchmarking5m 39s
-