public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Guy <martinwguy@gmail.com>
To: ami_stuff <ami_stuff@o2.pl>
Cc: gcc@gcc.gnu.org
Subject: Re: GCC 4..4.x speed regression - help?
Date: Mon, 17 Aug 2009 06:42:00 -0000	[thread overview]
Message-ID: <56d259a00908160902q54cda0a6nab0d7eb28abd8d48@mail.gmail.com> (raw)
In-Reply-To: <74af2d11.6acc4366.4a8812b9.bdfcd@o2.pl>

Yes, GCC is bigger and slower and for several architectures generates
bigger, slower code with every release, though saying so won't make
you very popular on this list! :)

One theory is that there are now so many different optimization passes
(and, worse, clever case-specific hacks hidden in the backends) that
the interaction between the lot of them is now chaotic. Selecting
optimization flags by hand is no longer humanly possible.

There is a project to untangle the mess: Grigori Fursin's MILEPOST GCC
at http://ctuning.org/wiki/index.php/CTools:MilepostGCC - an AI-based
attempt to autmatically select combinations of GCC optimization flags
according to their measured effectiveness and a profile of you source
code's characteristics. The idea is fairly repulsive but effective -
it reports major speed gains of the order of twice as fast compared to
the standard "fastest" -O options, and there is  Google Summer of Code
2009 project based on this work.

It seems to me that much over-hacked software lives a life cycle much
like the human one: infancy, adolescence, adulthood, middle-age (spot
the spread!) and ultimately old age and senility, exhibiting
characteristics at each stage akin to the mental faculties of a
person.

If you're serious about speed, you could try MILEPOST GCC, or try the
current up-and-coming "adolescent" open source compiler, LLVM at
llvm.org

    M

  reply	other threads:[~2009-08-16 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-16 16:02 ami_stuff
2009-08-16 22:46 ` Bernd Roesch
2009-08-17  0:39 ` ami_stuff
2009-08-17  6:42   ` Martin Guy [this message]
2009-08-17  8:53     ` Kenneth Hoste
2009-08-17 10:00       ` Richard Guenther
2009-08-17  9:03     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56d259a00908160902q54cda0a6nab0d7eb28abd8d48@mail.gmail.com \
    --to=martinwguy@gmail.com \
    --cc=ami_stuff@o2.pl \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).