Your program is being a CPU hog! In some cases, this situation can actually make your program run slowly! Your code needs to give some time back to the OS (i.e. delay or sleep). Use SDL_Delay(Uint32), where the Uint32 is in milliseconds. As a quick fix, you can toss a SDL_Delay(1) call into your loop. That will give up some amount of time, based on the OS and the resolution of SDL_Delay(), which is somewhere around 10ms. If you need better resolution than that, you have to store the time it takes to perform SDL_Delay(1), check that against delay calls, and then burn the rest of the time in an empty loop.
Here's a link to some code implementing that.