Skip to content

Learning how to write "Less Slow" code in Rust, from numerical micro-kernels to coroutines, ranges, and polymorphic state machines

License

Notifications You must be signed in to change notification settings

ashvardanian/less_slow.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Less Slow Rust

The spiritual little brother of less_slow.cpp. The benchmarks in this repository don't aim to cover every topic entirely, but they help form a mindset and intuition for performance-oriented software design.

Much of modern code suffers from common pitfalls: bugs, security vulnerabilities, and performance bottlenecks. University curricula often teach outdated concepts, while bootcamps oversimplify crucial software development principles.

Less Slow Rust

This repository offers practical examples of writing efficient Rust code. The topics range from basic micro-kernels executing in a few nanoseconds to more complex constructs involving parallel algorithms, coroutines, and polymorphism. Some of the highlights include:

To read, jump to the less_slow.rs source file and read the code snippets and comments.

Reproducing the Benchmarks

If you are familiar with Rust and want to review code and measurements as you read, you can clone the repository and execute the following commands.

rustup install nightly-2025-01-11
cargo +nightly-2025-01-11 bench