
17
Optimizing a Task-Based
Game Engine
Yannis Minadakis
17.1 Introduction
Before 2005, the CPU-side of game code was single threaded. Optimizing for the
CPU meant improving algorithms and data layout and removing unnecessary code.
Sampling profilers and call graphs were the tools of choice to find bottlenecks.
Parallelism was reserved for the GPU. The graphics APIs restricted developers to
expressing their code in a form that could be parallelized by the hardware. The
developer focused on how much load was placed on either the CPU or GPU and
tried to load-balance to achieve the highest frame throughput.
With the arrival of the Xbox 360 and PlayStation3,