Data-oriented design for business applications
summary
Shows concrete rewrites of a PO-file parser and microbenchmarks (custom quick bench and benchmark.net) that replace object graphs with packed layouts, yielding far lower latency and variance: summing amounts drops from ~300–400 ms to ~65 ms and to ~40 ms with vectorized code. Uses structs-of-arrays and hot/cold splits to remove pointer chasing, folds booleans into state fields to save space, and applies SIMD for tight loops; overall results report 5–10x speedup and much more stable memory behavior.
AI-written summary · about
chapters (20)
- 0:00Introduction and motivation
- 2:58What is data-oriented design
- 7:28Object-oriented vs data-oriented design
- 10:57Memory access patterns and cache impact
- 21:40Data-oriented design patterns
- 36:49Booleans and data packing
- 37:11Real-world business example introduction
- 39:36Object-oriented parser implementation
- 42:06Refactoring to data-oriented approach
- 45:14Performance comparison and fixes
- 48:52Struct of arrays optimization
- 51:18SIMD instructions for further speed
- 53:25Text processing with data-oriented design
- 56:36Normalization and performance results
- 1:00:19Summary and future topics
- 1:01:02Q&A: Code simplicity and maintainability
- 1:03:13Q&A: Available resources and demos
- 1:04:16Q&A: Learning curve for new developers
- 1:05:42Q&A: .NET 5 performance improvements
- 1:10:21Q&A: .NET 5 benchmarks and future
