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
- abseil / Performance Hintsabseil.io
- (Re)writing an interpreter in Rust – Danny van Kootendannyvankooten.com
- Measure What You Optimizecliffle.com
- Reddit - Please wait for verificationreddit.com
- abseil / Performance Hintsabseil.io
- A half-hour to learn Rustfasterthanli.me
- Optimization of Computer Programs in Cicps.u-strasbg.fr
- Learn Rust the Dangerous Waycliffle.com
- Rewriting Bun in Rust | Bun Blogbun.com
- Analyzing Data 180,000x Faster with Rustwillcrichton.net
- Rust Language Cheat Sheetcheats.rs
- LLVM is Smarter Than Meblog.sulami.xyz