Data-Oriented Design in C#: Why Objects Are Slowing You Down
In my previous article, we talked about starving the Garbage Collector by moving away from heap-allocated class types and leaning heavily into struct, Span<T>, and ArrayPool<T>.
That’s a critical first step, but it only solves half the problem. You’ve stopped the GC from pausing your app, but you might still be leaving massive amounts of CPU performance on the table. Why? Because of how your data is structured.
It’s time to talk about Data-Oriented Design (DoD).
The Object-Oriented Trap






