O'Reilly logo

Mastering SFML Game Development by Raimondas Pupius

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Improving CPU code performance

After establishing a baseline reading, we can begin making changes to our code. Some of these changes involve simply understanding the libraries we're using and being more cautious about the way they're deployed, while others revolve around making better design choices, applying faster and more appropriate algorithms, designing data structures better, and using the newest features of the C++ standard. Let's begin by taking a look at some easy changes that can be made to our code.

Optimizing the three most obvious bottlenecks

Judging by the profiler's results, there is quite a bit of room for improvement of the code we've written so far. In this section, we're going to be addressing three of the most inefficient implementations ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required