Re: C language dialect and optimization
Re: C language dialect and optimization
- Subject: Re: C language dialect and optimization
- From: Chris Espinosa <email@hidden>
- Date: Sun, 17 Dec 2006 21:33:33 -0800
On Dec 17, 2006, at 8:50 PM, Luigi Castelli wrote:
I am using X-code 2.4 on a Mac Powerbook Pro 2.16 GHz Intel Core Duo. As far as optimization is concerned, does it make a difference which C standard I am using? I am using C99 (specified as C Language Dialect in the project settings) because it's the one that allows the most flexibility. However I am wondering if that comes at the price of compiling slower code. Would anybody advise pro or against it? ...does it really make a difference or it's entirely up to the programmer taste?
The C language standard settings apply predomanantly (but not exclusively) to the front end of the compiler; the optimization takes place almost entirely in the back end. While it's not impossible, I'd say it was highly unlikely that any difference in language standard would have an effect on how well your code is optimized.
But, for that matter, all optimization is premature until you run and measure. Write your code, compile it, then use Shark to see what it actually does. You'll find that you will get far more performance out of your software by making sure it is doing only what it needs to do, and doing it well, than you will out of fiddling with compiler switches.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden