[SDL] SDL under Mac OS X

Matthew Cox matthew.c at rogers.com
Mon Jan 17 15:26:30 PST 2005


Bob Ippolito wrote:

> You can't really distribute software that doesn't work on a G3, so the 
> default optimizations used by the Xcode project are fine.  When the 
> Altivec patches make it in, they will be used conditionally at runtime 
> depending on the CPU.  Processor specific compile time optimization 
> flags are simply not appropriate when you're distributing compiled 
> software for a heterogeneous environment.  In my experience, even if 
> you do have the "luxury" of using them, they also do not have much of 
> an impact on performance anyway.  -fast can get you a few percent in 
> some cases, but then your application doesn't work on anything but the G5.

That wasn't my point at all. There's a difference between optimizing for 
a processor, and compiling only for that processor. You can optimize the 
scheduling and other such things for a specific CPU (Xcode can do this 
for you, I believe.) Depending on your software project, supporting a G3 
may be a total non-starter if the CPU reqs are above a certain level. So 
scheduling for a G4 (to get optimal performance on the low end) at the 
expense of small inefficiencies on the higher end machines (which won't 
be noticed) makes sense.

Furthermore, -Os can be one of the best optimizations you can apply. The 
more you can fit into your i-cache the better. Apple recommends all 
shipping code be -Os. So unless you know for certain that these binaries 
are built optimized for size, you shouldn't ship them.

>> Then of course there's the unix mindset of not really trusting 
>> anything you haven't compiled yourself (hey, that's why I was a 
>> Gentoo user pre-OS X)
>
>
> Where "compiled yourself" means "emerge compiled it for me with 
> whatever options the maintainer chose to use"? :)

Touché, 'cept for my makeflags :P

Matt




More information about the SDL mailing list