Re: OS X compiler flags

sayrer <[email protected]> Wed, 07 Nov 2007 04:15:33 -0000
Newsgroups gmane.comp.mozilla.performance
Organization http://groups.google.com
Message-ID <[email protected]>
On Nov 6, 10:32 pm, Mike Schroepfer <[email protected]> wrote:
>
> What were the results of the test?

The initial codesize numbers, with "-Oz -gfull", were great:

Z: 14.96MB -> 12.85MB

However, we saw smallish speed regressions with Tp2 and Tdhtml. I then
tried "-Oz -freorder-blocks -fno-reorder-functions -gfull" and cut the
perf regression in half, and codesize only increased to 13.05MB. We
got a small win in Ts.

I was talking it over with Stuart, and he mentioned that there are
areas of the code that obey global optimization settings that probably
shouldn't. His example was image decoders. DWitte mentioned the string
classes. Other targets might be NSPR and SpiderMonkey. My hypothesis
is that we're compiling some areas of the code with too little
optimization on Linux, and other areas with too much optimization on
the Mac. The good news is that we can make the benchmarks move by
changing these settings, so I think we should continue to work on it.

For the Mac, there are two additional areas we should consider
exploring:

1.) Most compilers will do profile-guided optimization. We should try
it.
2.) We should try to get our Intel Mac code compiling under ICC. We
might even find that some modules (pixman, etc) should be compiled
with ICC for release builds.

Or, it might be a wash. :) More investigation is needed.

- Rob