flâneur — a map of the web's best reading

Rust Optimization.md · GitHub

gist.github.com · 8,461 words · saved by 1 readers

GitHub Gist: instantly share code, notes, and snippets.

Achieving warp speed with Rust Contents: Number one optimization tip: don't Never optimize blindly Don't bother optimizing one-time costs Improve your algorithms CPU architecture primer Keep as much as possible in cache Keep as much as possible in registers Avoid Box<Trait> Use stack-based variable-length datatypes Loop unrolling is still cool assert! conditions beforehand Use link-time optimization Don't use #[inline(always)] Parallelize, but not how you think A case study Wrapping up If you're looking to write fast code in Rust, good news! Rust makes it really easy to write really fast code.

Explore this link on the map →

related reading