Performance of C++ Applications. Code Optimization and Speed Improvement
Performance of C++ Applications. Code Optimization and Speed Improvement
Summary:
The book "C++ Application Performance" is a practical guide for developers who want to learn how to write fast and efficient programs in C++. The author, Alexey Sokolov, a systems programmer with 15 years of experience, shares proven methodologies and tools for identifying bottlenecks and accelerating code performance.
What is this book about?
The book systematically covers all aspects of C++ application performance: from basic principles to advanced techniques. You will learn how to properly profile code, work with memory, optimize algorithms, and effectively use multithreading. Special attention is given to modern C++17/20 features, which allow you to write not only fast but also safe code.
Who is this book for?
- Intermediate and advanced C++ developers looking to improve the performance of their projects;
- Technical leaders and architects making decisions about optimization strategies;
- Specialists in high-load systems working with real-time applications, games, or financial systems;
- Senior university students in technical fields studying systems programming.
What will you learn from this book?
- Profiling fundamentals: how to use tools (perf, Valgrind, Intel VTune) to find bottlenecks;
- Memory optimization: working with cache, data alignment, memory pools, and reducing fragmentation;
- Algorithmic optimization: choosing the right data structures and algorithms for specific tasks;
- Multithreading and parallelism: effective use of std::thread, async, OpenMP, and SIMD instructions;
- Compiler optimizations: compiler flags, inlining, LTO, and Profile-Guided Optimization (PGO);
- Performance measurement: writing benchmarks using Google Benchmark and analyzing results;
- Real-world cases: analysis of real optimization examples from game engines, databases, and network services.
Why should you read this book?
The book is written in a lively style, contains many practical examples and ready-made solutions. The author does not just list techniques but explains how they work "under the hood," allowing you to make informed decisions during optimization. Each chapter ends with exercises to reinforce the material.
This book will become a desktop guide for anyone who wants their C++ applications to run as fast and efficiently as possible. Whether you are writing a high-load server, a game, or a scientific application, you will find useful tips and tools here.