Performance of Rust Applications
300 pages
English
PDF
4.5

Performance of Rust Applications

Performance of Rust Applications

Author:

Year:

Summary:

The book "Performance of Rust Applications" is a deep dive into the world of low-level optimization and creating fast, efficient programs in the Rust language. Unlike many introductory guides, this book focuses exclusively on performance issues: from micro-optimizations to architectural solutions for high-load systems.



What is this book about?

The book is structured as a practical guide that step by step leads the reader from simple code acceleration techniques to complex methods of working with memory, CPU cache, and parallel computing. You will learn:

  • How to use profilers (perf, flamegraph, valgrind) to find bottlenecks.
  • The principles of zero-cost abstractions and how not to pay for what you don't use.
  • Optimizing heap operations: allocators, arenas, COW, and borrowing strategies.
  • Parallelism and concurrency: from async/await to lock-free data structures.
  • Interaction with hardware: SIMD instructions, cache lines, and data alignment.
  • Benchmarking and writing reliable performance tests.


Who is this book for?

The book is intended for experienced developers who are already familiar with the basics of Rust and want to take it to the next level. You will learn to think in terms of CPU cycles, cache misses, and memory bandwidth. This is an ideal choice for:

  • Engineers working on high-load backend services.
  • Developers of game engines and real-time systems.
  • Specialists in embedded systems and WebAssembly.
  • Anyone who wants to get the most out of the Rust language.


What will you learn?

After reading the book, you will be able not only to find and fix slow code sections but also to design systems with performance in mind from the very beginning. You will master advanced techniques such as:

  • Writing custom allocators and working with uninitialized memory.
  • Using unsafe code for controlled bypassing of safety checks.
  • Build optimization: LTO, BOLT, PGO, and compiler tuning.
  • Profiling in production with minimal overhead.

Each chapter contains real-world examples, comparative benchmarks, and ready-to-use patterns. The book is written in a lively style with an emphasis on practice — no abstract theory, only what actually works in production.

Recommendations