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.
related reading
- A half-hour to learn Rustfasterthanli.me
- abseil / Performance Hintsabseil.io
- Rust Language Cheat Sheetcheats.rs
- How to Learn Rustgist.github.com
- Fast and Simple Rust Internermatklad.github.io
- Patterns for Defensive Programming in Rust | corrode Rust Consultingcorrode.dev
- Reddit - Please wait for verificationreddit.com
- (Re)writing an interpreter in Rust – Danny van Kootendannyvankooten.com
- Beating the fastest lexer generator in Rustalic.dev
- Inline In Rustmatklad.github.io
- Speeding Up the Webcola Graph Viz Library with Rust + WebAssembly - Casey Primozic's Homepagecprimozic.net
- Measure What You Optimizecliffle.com