Optimization flags in qmake.spec

Daniel J. Luke dluke at geeklair.net
Mon Jun 11 07:07:31 PDT 2007

On Jun 11, 2007, at 9:38 AM, Jochen Küpper wrote:
> On 11.06.2007, at 11:02, Pierre Queinnec wrote:
>> IIRC Apple recommends -Os, not -O2.
> Why?
> Where is that documented?

I've seen it elsewhere, but in this link, the "Fastest, smallest"  
Xcode setting corresponds to -Os


There's also discussion here:


Which mentions -
"When in doubt, it may be better to optimize for size, since smaller  
code may execute relatively faster. For example, large functions or  
loops containing data access patterns that do not exhibit a strong  
locality of reference may not fit into a processor's cache lines,  
which can lead to cache misses and subsequent fetches from memory.  
Smaller functions or loops with local data access stand a better  
chance of fitting in a given cache line and requiring fewer memory  

Daniel J. Luke
| *---------------- dluke at geeklair.net ----------------* |
| *-------------- http://www.geeklair.net -------------* |
|   Opinions expressed are mine and do not necessarily   |
|          reflect the opinions of my employer.          |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.macosforge.org/pipermail/macports-users/attachments/20070611/e38c619c/PGP.bin

More information about the macports-users mailing list