C++ Application Performance
300 pages
English
PDF
4.5

C++ Application Performance

C++ Application Performance

Author:

Year:

Summary:

The book "C++ Application Performance" is a practical guide for developers who want to learn how to write fast, efficient, and scalable code in C++. Unlike academic textbooks, this book focuses on real-world tasks: how to find bottlenecks, how to speed up program execution without losing readability, and how to prepare an application to work under high load.



What is this book about?

  • Profiling and Benchmarking: You will learn how to correctly measure performance using tools (perf, Valgrind, Google Benchmark), interpret results, and find bottlenecks.
  • Memory Management: Efficient memory management, cache misses, allocators, move semantics, and avoiding copies. We will analyze how to reduce fragmentation and speed up data access.
  • Algorithms and Data Structures: How to choose the right container (std::vector vs std::list, flat_map, small optimizations), when to use hash tables, and when to use trees.
  • Multithreading and Concurrency: Parallel algorithms, synchronization (mutexes, atomics, lock-free structures), thread pools, and working with std::async.
  • Compiler Optimization: Key compilation flags (O2, O3, LTO), understanding assembly output, inlining, and vectorization.
  • Real-World Examples: Code analysis from high-load systems: game engines, financial servers, big data processing.


Who is this book for?

  • C++ developers with 1+ years of experience who want to advance to a senior level.
  • Engineers working on latency-sensitive systems (trading platforms, databases, games).
  • Those preparing for interviews at FAANG or product companies that require a deep understanding of performance.


What will you learn?

  • How to speed up code by 2-10 times without changing the architecture.
  • Why "obvious" optimizations often do harm and how to avoid this.
  • How to design systems that remain fast under increasing load.
  • Modern C++17/20 practices (std::optional, std::variant, concepts) for improving performance.


The book is written in a lively style, contains many code listings, graphs, and practical exercises. After reading it, you will be able not only to write fast code but also to convincingly defend your decisions in front of colleagues.

Recommendations