
17. Optimizing a Task-Based Game Engine 241
to 6.68 ms. Benchmarking the tasking system separately showed about 1.5 ms
spent scheduling or about .3 ms of wall time (1.5 ms /4 cores). The animation
tasks appear to be running slower than expected. The excess execution time is
inside the animation tasks themselves. To analyze where that time is going, we can
decorate other parts of the system as we did with tasks. The most important code
to decorate is code that contains synchronization points such as memory allocation.
With memory operations decorated (Figure 17.5), we can now see where the
problem is. The model allocates memory during the animation