Performance of Rust Applications
300 pages
English
PDF
4.5

Performance of Rust Applications

Performance of Rust Applications

Author:

Year:

Summary:

The book "Rust Application Performance" is a practical guide for developers who want to squeeze the maximum out of the Rust language. Rust is already famous for its speed and safety, but even in it, you can write slow code if you don't understand the internal mechanisms of the compiler, memory allocation, and multithreading. This book will help you move from "just working code" to "code that flies."



The author, Alexey Sokolov, is an experienced systems engineer and contributor to open-source projects in Rust, sharing real-world production cases. You will learn how to profile applications using perf, flamegraph, and valgrind, how to deal with "unexpected" bottlenecks, and why sometimes unsafe code is not evil, but a necessity.



Who is this book for?

  • Rust developers who want to write fast and efficient code.
  • Engineers working on high-load systems (web servers, parsers, databases).
  • Systems programming specialists transitioning to Rust from C/C++.
  • Anyone who wants to understand the inner workings of the compiler and LLVM.


What will you learn?

  • Profiling and Benchmarking: how to find bottlenecks using tools built into the Rust ecosystem.
  • Memory Management: stack, heap, allocators — how to avoid unnecessary copies and leaks.
  • Fearless Multithreading: async/await, tokio, rayon — when to use each approach.
  • Unsafe and FFI: safe interaction with C libraries and optimization of critical sections.
  • Compiler Optimizations: how inlining, devirtualization, and vectorization work.
  • Cache-Friendly Code: data structures that speed up memory access.


The book contains many code examples that can be immediately applied in your projects. Each chapter ends with practical tasks and checklists for performance auditing.



After reading, you will be able to:

  • Increase the speed of Rust applications by 2-10 times without losing safety.
  • Design architecture that scales on multi-core processors.
  • Understand how the compiler transforms your code into machine instructions.


This is not just a book — it is a set of tools and a mindset that distinguishes a professional from an amateur. If you want your Rust programs to run at the limit of hardware capabilities — this book is for you.

Recommendations