Optimizing Rust Code: Profiling, Benchmarking, and Performance Tuning Techniques for Speed - Couverture souple

Livre 1 sur 3: High-Performance Rust Development

Vale, Marcus

 
9798185116616: Optimizing Rust Code: Profiling, Benchmarking, and Performance Tuning Techniques for Speed

Synopsis

Master the Art of Writing Blazingly Fast Rust Code

Writing safe Rust is a skill. Writing fast Rust is a discipline.

Most developers learn to satisfy the borrow checker and move on. But a program that compiles without errors is not automatically a program that runs at maximum speed. Between your source code and the processor lies a complex world of CPU pipelines, cache hierarchies, memory allocators, and compiler optimization passes. Ignoring that world is the difference between software that works and software that dominates.

This book bridges that gap.

Built for intermediate to advanced Rust developers, this comprehensive guide transforms the way you think about, measure, and improve the performance of systems software. Drawing from real-world profiling workflows and hardware-level analysis, it equips you with a rigorous, evidence-based methodology that top systems engineers use to push code to the absolute physical limits of modern hardware.

What You Will Learn

  • Build the performance engineering mindset: measure first, optimize second, verify always

  • Profile Rust applications on Linux, macOS, and Windows using perf, cargo-flamegraph, and hardware performance counters

  • Write statistically rigorous microbenchmarks and macro-benchmarks with Criterion.rs

  • Understand how rustc and LLVM transform your source code, and write code that enables the most aggressive compiler optimizations

  • Eliminate cache misses through data-oriented design, struct layout tuning, and memory-efficient allocation strategies

  • Reduce heap allocation overhead by replacing the default system allocator with jemalloc or mimalloc

  • Tune async Rust and the Tokio runtime for high-concurrency, low-latency network services

  • Eliminate false sharing, optimize lock contention, and leverage Rayon for data parallelism

  • Deploy continuous profiling infrastructure using eBPF-based tools in production environments

  • Build a performance-aware engineering culture with automated regression detection and SLO-driven monitoring


Who This Book Is For

You should already know Rust. You should understand ownership, borrowing, lifetimes, traits, and basic concurrency. If you have built real projects in Rust and want to move beyond correctness into raw speed, this book is your next step.

Performance engineering is not guesswork. It is a science. This book gives you the instruments, the methodology, and the deep hardware understanding to forge Rust applications that do not merely run, but dominate.

Les informations fournies dans la section « Synopsis » peuvent faire référence à une autre édition de ce titre.