I noticed this morning that I had not set the "SDL_RLEACCEL" flag on the background surface. This stands for "run length encoding acceleration", and usually gives a good performance increase. However, in this case it was a HUGE difference.
Before the fix, the game was running in about 134-137 frames/second (on my computer). Now it runs with 475-520 frames / second, depending on how many tiles that has to be drawn on screen. More graphics on screen = less fps, naturally.
The game speed gained is about 3.5 - 3.7 faster!! Not bad at all :)
So remember to go over old code you've written sometimes and make sure things have been set up properly.
For the SDL interested ones, this is how you set it up:
Until next post!