curl-library
Re: Refinement to optimize options for Mac OS X
Date: Mon, 13 Oct 2008 17:43:43 +0200
2008/10/13, Dan Fandrich wrote:
> On Sun, Oct 12, 2008 at 10:03:20AM -0400, Daniel Johnson wrote:
> > Mac OS X uses gcc but the preferred optimization setting is -Os instead of
> > -O2. Something like this would work:
>
> I've heard that -Os is often better than -O2 because the smaller code can
> make the working set fit entirely in the cache, which makes it faster as well
> as smaller.
Yes, it is common that size-optimizing achieves faster results than
speed-optimizing.
Please take in account that the curl-compilers.m4 stuff is not
complete yet, and that it is suffering changes nearly all days.
Initially I'm not against using -Os instead of -O2. But I think that
if the change is done in curl-compilers.m4 it should be done for all
gcc builds not only MAC targets.
Before this change is done I would like to have several things sorted out first.
*) Have curl-compilers.m4 in a more stable state, and truly working
for _all_ compilers used for autobuilds that actually use the
configure script.
*) Once the above point is achieved, change testcurl.pl so that
autobuilds are done with -O2 at least for one full day to verify if
this surfaces new warnings.
*) Another autobuild run could be done with -Os instead of -O2 and see
what happens with new warnings detected in above point. But unless
these warnings fall just in the optimizations that -Os disables
relative to -O2, there should be no change.
IOW I think that -O2 is more demanding on the compiler and on the code
it is compiling and could be a better choice for autobuilds. But I
have no hard facts yet.
-- -=[Yang]=-Received on 2008-10-13