Weird. There should not be such a big fps difference between gcc 4.1.2 and 4.2.1. Is the demo compiled as 64bit or 32bit application? I don't know what the default for gcc on a 64bit system is, but I think with -m32 or -m64 you can toggle this. The SDL_BlitSurface and SDL_FillRect calls should normally not make such a big difference on different systems.