• 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: -O3 vs. -Os
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -O3 vs. -Os


  • Subject: Re: -O3 vs. -Os
  • From: Stefan Werner <email@hidden>
  • Date: Tue, 17 Jan 2006 23:08:39 +0100

Because OO languages often have accessors, for any given algorithm,
they are likely to call more functions than say, C. Yet with higher
optimization, the compiler can inline most of those small-function
calls, especially accessors.

Especially when taking advantage of C++ features like operator overloading, -O3 and function inlining can make a huge difference. Imagine using a C++ class representing a vector, and you use operator overloading for cross and dot product, rotations, etc. Or take OpenEXR for example, it's implementing a half precision floating point class in 16 bits. Without inlining, such code becomes incredibly slow.


Stefan
_______________________________________________
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


  • Prev by Date: Re: Universal Binaries for an app built with different SDK versions
  • Next by Date: Re: Universal Binaries for an app built with different SDK versions
  • Previous by thread: Re: -O3 vs. -Os
  • Next by thread: Deploying Mac Software.
  • Index(es):
    • Date
    • Thread