C++ High Performance. High-Performance Computing in C++
C++ High Performance. High-Performance Computing in C++
Summary:
Introduction
The book C++ High Performance (authors: Björn Andrist, Viktor Sehr, 2020, 538 pages) is not just another textbook on language syntax, but a deep dive into the art of writing fast and efficient C++ code. In a world where performance is often a critical requirement (games, high-load servers, financial systems, embedded devices), the ability not just to write working code, but to make it as fast as possible, becomes a key skill. This book offers a systematic approach to optimization, starting from application architecture and ending with low-level processor tricks.
What is this book about?
The book is divided into three logical parts that sequentially guide the reader from general principles to specific techniques.
Part 1: Fundamentals of Performance
The authors start with fundamental concepts: what performance is, how to measure it, and what bottlenecks exist. This section covers:
- Profiling and benchmarking (tools: perf, Valgrind, Google Benchmark).
- The impact of CPU architecture (pipeline, cache, branch prediction).
- Memory optimization (data locality, alignment, pools).
Part 2: Advanced C++ Techniques
The second part is dedicated to using modern C++ features to improve performance:
- Move semantics and perfect forwarding.
- Compile-time computation (constexpr, templates).
- Polymorphism without virtual functions (CRTP, std::variant, std::any).
- Smart pointers and resource management.
Part 3: Multithreading and Parallelism
The final part is the most extensive and practical. It covers:
- C++ memory models and atomic operations.
- Threads, mutexes, conditional_variable.
- Parallel algorithms (std::execution::par).
- SIMD instructions (SSE, AVX) and their use via intrinsics.
- Asynchronous programming (std::future, std::async).
Who is this book for?
The book is aimed at experienced C++ developers who already write confidently in the language but want to take their skills to the next level. It will be useful for:
- Game and graphics engine developers.
- Engineers working on high-load servers.
- Embedded systems specialists.
- Anyone who wants to understand how modern C++ works "under the hood."
What will the reader learn?
After reading, you will be able to:
- Correctly choose profiling tools and interpret their results.
- Optimize cache and memory usage.
- Use move semantics and constexpr to speed up code.
- Build efficient multithreaded applications without data races and deadlocks.
- Apply SIMD instructions for vector computations.
- Design architecture that is inherently performance-oriented.
Strengths of the book
The main advantage is its practical focus. Each technique is accompanied by real code examples and benchmarks showing performance gains. The authors don't just say "do it this way," but explain why it works, based on modern processor architecture. The book is written in a lively style; complex concepts (such as the C++ memory model or SIMD) are explained very clearly.
Special mention should be made of the quality of the examples: they are not taken out of context, but represent complete mini-projects that can be immediately applied in your own work.
Who is it recommended for?
I definitely recommend this book to everyone who writes in C++ and wants their code to run as fast as possible. If you already know the syntax but feel you are hitting a performance ceiling — C++ High Performance will be your springboard. It is not for beginners, but for those ready to delve deeper into t
Recommendations
Learning with Small Data
API Development in Go (Golang): From Design to Deployment
Testing C++ Applications: From Unit Tests to Integration Coverage
PHP: Tips and Best Practices — From Beginner to Professional
Security of Rust Applications: From Basics to Advanced Techniques
Writing an Interpreter in Go