public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Karel Gardas <kgardas@objectsecurity.com>
To: Giovanni Bajo <giovannibajo@libero.it>,
	Steven Bosscher <stevenb@suse.de>,
	 Paolo Bonzini <bonzini@gnu.org>
Cc: GCC Mailing List <gcc@gcc.gnu.org>
Subject: Re: Compilation performance comparison of gcc3.4.1 and gcc3.5.0 2004-08-30 on MICO sources
Date: Thu, 02 Sep 2004 09:41:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.43.0409021105450.1006-100000@thinkpad.gardas.net> (raw)
In-Reply-To: <042301c49015$66c3fdd0$bf4e2597@bagio>


Giovanni,

I'm working on submiting bugreports right now, but I have observed one to
me very interesting fact. When I compile files preprocessed by 3.5.0 with
gcc3.4.1 I got slower compile-times, which means regression(s) are not
that dramatic. For example for typecode.cc I got from 40% to 30%. Also for
basic_seq.cc which should regress on all optimization levels, I now got
_no_ regression at all! In fact I got speedups! Look at following table:

Not preprocessed file:
File		341-O0	350-O0	Delta%	341-O1	350-O1	Delta%	341-O2	350-O2	Delta%
basic_seq.cc	3.77	4.21	-10.45	3.98	4.99	-20.24	3.82	5.72	-33.22

File preprocessed by GCC 3.4.1:
File		341-O0	350-O0	Delta%	341-O1	350-O1	Delta%	341-O2	350-O2	Delta%
basic_seq.cc	3.69	3.31	11.48	3.91	3.47	12.68	3.78	3.65	3.56

File preprocessed by GCC 3.5.0:
File		341-O0	350-O0	Delta%	341-O1	350-O1	Delta%	341-O2	350-O2	Delta%
basic_seq.cc	4.61	4.15	11.08	5.28	4.83	9.32	5.62	5.57	0.9


So it seems 3.5.0 is _always_ faster on preprocessed file than 3.4.1! So
either 3.5.0's libstdc++ library is bigger or 3.5.0's cpp is slower.

Size comparison of these two files look:

$ ls -la basic_seq.*.ii
-rw-rw-r--    1 karel    karel     1223628 Sep  2 11:13 basic_seq.341.ii
-rw-rw-r--    1 karel    karel     1243090 Sep  2 11:01 basic_seq.350.ii

I hope you understand that I'm reluctant to submit a regression bugreport
in this case. :-) I have also noted this thing in PR c++/17278 -- which is
for typecode regression...

When I compare table (1) 341-O0 - table (2) 341-O0 == 3.77 - 3.69 == 0.08
seconds spent for 3.4.1's cpp
The same for 3.5.0 is table (1) 350-00 - table (3) 350-O0 == 4.21 - 4.15 == 0.06
seconds, so even 3.5.0's cpp should be a bit faster. So it seems the
culprit should be libstdc++ in 3.5.0, but is it possible that the size
difference of 20kB i.e. 1% difference might do such big difference in
compilation speed?

Thanks,

Karel

On Wed, 1 Sep 2004, Giovanni Bajo wrote:

> Karel Gardas wrote:
>
> > 1) typecode.cc: 40% regression on O1 while 7% speedup on O2
>
> Can you please file a new bugreport with this -O1 regression, attacching this
> preprocessed testcase and the time reports to it? Also link Steven's message in
> it: http://gcc.gnu.org/ml/gcc/2004-08/msg01602.html, which contains the
> analysys of this.
> Then we can set that the new bug blocks PR 13776.
>
> I think it is better to track these issues with different PRs, and just
> connects them to PR 13776 (which is quite confusing at this point) just with
> the Bugzilla relationships.
>
> > -O2: 33% basic_seq.cc and following with 27% static.cc
>
> Can you open also a new bugreport about the regression of basic_seq.cc, which
> regresses at all optimization levels? Again, attacch preprocessed testcases, a
> comparison with 3.4 for all optimization levels, and the relative time reports.
>
> Actually, I should also note that at this point we cannot probably do much
> about compile time regressions at -O1/2/3. GCC 3.5 features more than 60 new
> optimization passes, so it is already a half miracle we don't regress
> everywhere. Code generation is also improved of course, so we have to lose a
> little somwhere. Of course, big regressions (>20% on files of non-trivial size)
> could probably still analyzed a little to see if we find obvious offenders.
>
> Thank you for doing this, it is of great help!
>
> Giovanni Bajo
>
>
>

--
Karel Gardas                  kgardas@objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com




  reply	other threads:[~2004-09-02  9:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31  9:58 Karel Gardas
2004-08-31 10:12 ` Steven Bosscher
2004-08-31 10:28   ` Karel Gardas
2004-08-31 10:44     ` Paolo Bonzini
2004-08-31 10:46       ` Karel Gardas
2004-08-31 10:49         ` Steven Bosscher
2004-08-31 11:00           ` Paolo Bonzini
2004-08-31 11:24             ` Steven Bosscher
2004-08-31 19:30               ` Mike Stump
2004-08-31 12:48             ` Karel Gardas
2004-09-01  7:18               ` Paolo Bonzini
2004-08-31 10:55         ` Steven Bosscher
2004-08-31 13:57           ` Karel Gardas
2004-09-01 11:18 ` Giovanni Bajo
2004-09-02  9:41   ` Karel Gardas [this message]
2004-09-02 20:32     ` Compilation performance comparison of gcc3.4.1 and gcc3.5.02004-08-30 " Giovanni Bajo
2004-09-04  7:35       ` Karel Gardas
2004-09-02  9:44   ` Compilation performance comparison of gcc3.4.1 and gcc3.5.0 2004-08-30 " Karel Gardas

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=Pine.LNX.4.43.0409021105450.1006-100000@thinkpad.gardas.net \
    --to=kgardas@objectsecurity.com \
    --cc=bonzini@gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=giovannibajo@libero.it \
    --cc=stevenb@suse.de \
    /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).