#157682 - simonjhall - Tue May 27, 2008 8:26 pm
I've been recently reading some of that old stuff that Chris Hecker did in the day for Game Developer Magazine and a few of interest to me are about the optimising ability of your compilers. He goes on to test a bunch of compilers (many of which don't exist any more) and tries to get them to generate the best code *without using assembly* with a bit of gentle persuasion.
http://chrishecker.com/images/a/ac/Gdmcomp1.pdf
http://chrishecker.com/images/d/db/Gdmcomp2.pdf
First article's about PowerPC code and the second is about Intel.
In these articles he talks about the steps that a compiler will perform in order to transform your code into the best meta code before it's turned into machine code and when you can do to make it easier/harder for the compiler to do its job.
After reading them I thought "ok, let's see how much compiler tech has advanced in the last ten years" and tried Visual C++ (.NET 2003) and a PowerPC GCC (4.something) with the some of the examples.
The biggest surprise is that many of the results are worse! The code generation was really poor! (obviously compiler optimisation has improved in other areas though)
Worth a read if you're bored.
This post was dedicated to all the losers out there who are convinced that the inline and const keywords allow your code to run in zero time
_________________
Big thanks to everyone who donated for Quake2
http://chrishecker.com/images/a/ac/Gdmcomp1.pdf
http://chrishecker.com/images/d/db/Gdmcomp2.pdf
First article's about PowerPC code and the second is about Intel.
In these articles he talks about the steps that a compiler will perform in order to transform your code into the best meta code before it's turned into machine code and when you can do to make it easier/harder for the compiler to do its job.
After reading them I thought "ok, let's see how much compiler tech has advanced in the last ten years" and tried Visual C++ (.NET 2003) and a PowerPC GCC (4.something) with the some of the examples.
The biggest surprise is that many of the results are worse! The code generation was really poor! (obviously compiler optimisation has improved in other areas though)
Worth a read if you're bored.
This post was dedicated to all the losers out there who are convinced that the inline and const keywords allow your code to run in zero time
_________________
Big thanks to everyone who donated for Quake2