Best Compiler?


Godmil

Active Member
Joined
May 6, 2006
Messages
585
Website
www.godmil.com
Hello, I've just started learning SDL with the Lazy Foo tutorials, and there is one where it calculates the framerate at which the program is running... it's a very simple program that really isn't doing anything. I was stunned when I ran it the first time and was getting ~37fps on my Athlon 2100. That seems incredibly slow for a program that doesn't do anything. I later noticed that I can add optimisation during the compile (using Dev-C++) and now I get ~57fps. Which is still kinda slow, but a huge improvement.

So that got me thinking, the compiler has to have a huge influence on the speed of the software so I was curious, what compilers out there have the best optimisation?
Does anyone have any recommendations?
 
Hello, I've just started learning SDL with the Lazy Foo tutorials, and there is one where it calculates the framerate at which the program is running... it's a very simple program that really isn't doing anything. I was stunned when I ran it the first time and was getting ~37fps on my Athlon 2100. That seems incredibly slow for a program that doesn't do anything. I later noticed that I can add optimisation during the compile (using Dev-C++) and now I get ~57fps. Which is still kinda slow, but a huge improvement.

So that got me thinking, the compiler has to have a huge influence on the speed of the software so I was curious, what compilers out there have the best optimisation?
Does anyone have any recommendations?

In my experience, gcc does a pretty good job with -O2. In your example, maybe you compiled with debug enabled? Well, a program that does nothing should probably run faster than even 57 fps on a Athlon 2100+.
You might want to do some profiling to see whether the CPU hog is in your program.
 
Last edited by a moderator:
Back
Top