C++ Data-Oriented Design: Cache-Coherent Data Layouts, Structure of Arrays, Memory Access Pattern Optimization, and Performance Engineering for CPU-Bound Systems. - Couverture souple

Livre 9 sur 11: High-Performance C++ Engineering

S. Lightner, Billie

 
9798195672515: C++ Data-Oriented Design: Cache-Coherent Data Layouts, Structure of Arrays, Memory Access Pattern Optimization, and Performance Engineering for CPU-Bound Systems.

Synopsis

Stop Fighting the CPU. Ditch Object-Oriented Bottlenecks and Architect for Pure Hardware Throughput.

Modern CPUs are insanely fast, but memory is slow. If you are writing traditional Object-Oriented C++ relying on arrays of pointers, virtual dispatch, and deeply nested objects, you are starving the processor. A single L3 cache miss costs hundreds of clock cycles. C++ Data-Oriented Design is the definitive engineering manual for breaking the OOP habit and structuring your data to perfectly align with the physical realities of the silicon.

Whether you are building a custom game engine, a high-frequency trading order book, or a massive particle simulation, this book teaches you how to transform pathological memory access patterns into cache-coherent, vectorized data pipelines. You will learn to measure the true cost of a cache miss using perf and Intel VTune, and then completely re-architect your data layouts for maximum throughput.
Inside, you will discover:

  • The Hardware Reality: Understand cache line mechanics, TLB pressure, and why OOP memory layouts betray the CPU's prefetcher.
  • Layout Fundamentals: Master structure packing, hot/cold data separation, and alignment to maximize useful bytes per cache fetch.
  • Structure of Arrays (SoA) vs. Array of Structures (AoS): Learn exactly when to transition your data models to SoA to unlock massive SIMD throughput and AVX-512 auto-vectorization.
  • Entity Component Systems (ECS): Build a production-grade ECS from scratch, comparing Archetypal storage versus Sparse Sets for data-driven architectures.
  • Pointer Elimination: Eradicate pointer-based trees and linked lists. Implement Flat Arrays, Slot Maps, and Generational Indices for O(1) lookups without heap fragmentation.
  • Concurrent DOD: Defeat false sharing at the cache-line level and design lock-free, per-thread data partitions that scale linearly across 64+ cores.
  • Real-World Application: Step-by-step refactoring guides for transforming Game Engine Scene Graphs and HFT Order Books to data-oriented layouts.
THE PERFORMANCE VAULT (Appendix)

Built for the systems architect who needs immediate answers, the Appendix provides drop-in reference material:
  • The Cache Line Size Reference: Architecture comparison table for x86-64, ARM, RISC-V, and Embedded targets.
  • The AoS vs. SoA Decision Matrix: Instantly determine the optimal layout for your specific workload characteristics.
  • The Data Layout Audit Checklist: 12 mandatory questions to evaluate the cache efficiency of any production data structure before it ships.
Don't let memory latency throttle your application. Align your data with the hardware, master Data-Oriented Design, and squeeze every drop of performance from the silicon.

Les informations fournies dans la section « Synopsis » peuvent faire référence à une autre édition de ce titre.