This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Massive performance regression from switching to gcc 4.5


On 06/24/2010 12:06 PM, Andrew Pinski wrote:


On Jun 24, 2010, at 11:50 AM, Taras Glek <tglek@mozilla.com> wrote:

Hi,
Just wanted to give a heads up on what might be the biggest compiler-upgrade-related performance difference we've seen at Mozilla.


We switched gcc4.3 for gcc4.5 and our automated benchmarking infrastructure reported 4-19% slowdown on most of our performance metrics on 32 and 64bit Linux.

A lone 8% speedup was measured on the Sunspider javascript benchmark on 64bit linux.

Here are some of the slowdowns reported:
http://groups.google.com/group/mozilla.dev.tree-management/browse_thread/thread/77951ccb76b5e630#


http://groups.google.com/group/mozilla.dev.tree-management/browse_thread/thread/624246d7d900ed41#



Most of the code is compiled with -fPIC -fno-rtti -fno-exceptions -Os

Stop right there. You are compiling at -Os, that is tuned for size and not speed. So the question is did the size go down? Not the speed decreased. Try at -O2 and report back. I doubt we are going to do a tradeoff for speed at -Os at all.
Thanks,
Andrew Pinski


Good point.

Looks like the actual problem is that at -Os there is less inclining happening in 4.5 vs 4.3, which results in a bigger binary and slower code.

I tried 4.5 -O2 and it's actually faster than 4.3 -Os.

I am happy that -O2 performance is actually pretty good, but -Os regression is going to hurt on mobile.

Taras


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]