• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: C language dialect and optimization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

Chris

 _______________________________________________
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

References: 
 >C language dialect and optimization (From: Luigi Castelli <email@hidden>)

  • Prev by Date: C language dialect and optimization
  • Next by Date: Re: Code Completion on Tab Only
  • Previous by thread: C language dialect and optimization
  • Next by thread: Re: C language dialect and optimization
  • Index(es):
    • Date
    • Thread