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

-O3 vs. -Os


  • Subject: -O3 vs. -Os
  • From: Steve Checkoway <email@hidden>
  • Date: Mon, 16 Jan 2006 23:22:24 -0800

I've just discovered something a bit surprising. I've been building my app with -O3 and I'm getting a binary of 8972584 bytes, after striping (strip -x). I've read numerous times that -Os will lead to better performance since it will be smaller and thus have more cache hits. I decided to test (okay, I made a bold proclamation in a cvs commit message that -Os would reduce the size without testing and somebody encouraged me to test it, "er, I can guarantee you -Os is not faster than -O3 for C++"). The result with -Os was 9157124 bytes after stripping.

The app is roughly 180,000 lines of C++, 10,700 lines of C, 400 lines of objective-C++ and a 300 lines of Objective-C.

Is this typical?

- Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: -O3 vs. -Os
      • From: Rustam Muginov <email@hidden>
  • Prev by Date: Re: Undefined symbol __error()
  • Next by Date: Re: -O3 vs. -Os
  • Previous by thread: Re: Popups in Developer Documentation window broken?
  • Next by thread: Re: -O3 vs. -Os
  • Index(es):
    • Date
    • Thread