public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Compilation time in gcc-4.4.0
@ 2010-07-08 20:58 Maxiwell Garcia
  2010-07-10 22:04 ` Ian Lance Taylor
  2010-07-13 14:50 ` Paolo Bonzini
  0 siblings, 2 replies; 8+ messages in thread
From: Maxiwell Garcia @ 2010-07-08 20:58 UTC (permalink / raw)
  To: gcc

Hi,

I am writing a paper about instruction-set architecture simulators. In
first time, I used gcc-4.4.0 and the compilation time reached 33
minutes (with -O3) for my simulator and the performance reached 270
MIPS (Million instruction per second). When I used the gcc-4.4.4, in
the same code, the compilation time reached 39 seconds and the
performance reached 600 MIPS. My code have many "switchs" with 512
"cases" and the library <systemc.h> is in use.
How to explain this behavior in the compilation and performance in my paper?

Thx,

-- 
Maxiwell Salvador Garcia
MSc Computer Science Student
Institute of Computing - UNICAMP

"In a world without walls and fences, who needs windows and gates"

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compilation time in gcc-4.4.0
  2010-07-08 20:58 Compilation time in gcc-4.4.0 Maxiwell Garcia
@ 2010-07-10 22:04 ` Ian Lance Taylor
  2010-07-13  3:12   ` BLUE 3TOO
  2010-07-13 14:50 ` Paolo Bonzini
  1 sibling, 1 reply; 8+ messages in thread
From: Ian Lance Taylor @ 2010-07-10 22:04 UTC (permalink / raw)
  To: Maxiwell Garcia; +Cc: gcc

Maxiwell Garcia <maxiwell@gmail.com> writes:

> I am writing a paper about instruction-set architecture simulators. In
> first time, I used gcc-4.4.0 and the compilation time reached 33
> minutes (with -O3) for my simulator and the performance reached 270
> MIPS (Million instruction per second). When I used the gcc-4.4.4, in
> the same code, the compilation time reached 39 seconds and the
> performance reached 600 MIPS. My code have many "switchs" with 512
> "cases" and the library <systemc.h> is in use.
> How to explain this behavior in the compilation and performance in my paper?

If I'm reading this correctly, it sounds like a useful optimization fix
in gcc 4.4.4.  The compiler runs faster and generates better code.

So I'm not sure what your question is.  Are you asking us why gcc has
gotten better?

Ian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Compilation time in gcc-4.4.0
  2010-07-10 22:04 ` Ian Lance Taylor
@ 2010-07-13  3:12   ` BLUE 3TOO
  0 siblings, 0 replies; 8+ messages in thread
From: BLUE 3TOO @ 2010-07-13  3:12 UTC (permalink / raw)
  To: Ian Taylor, maxiwell; +Cc: gcc gcc


33 minutes to 39 second? that sounds a drastic improvement. 
The performance improvement is also amazing.
 
You can try to divide your program into subphases and measure 
the biggest change in time and then focus on parts that contribute
to the most improvement. Sometimes it is can be done quickly through
comparing the optimization log/IR dumpings/assembly.
 
if everything is right, your paper probably is a good story to tell.
But before that, I guess the compiler is quite noisey. :)

 

----------------------------------------
> From: iant@google.com
> To: maxiwell@gmail.com
> CC: gcc@gcc.gnu.org
> Subject: Re: Compilation time in gcc-4.4.0
> Date: Sat, 10 Jul 2010 15:04:02 -0700
>
> Maxiwell Garcia writes:
>
>> I am writing a paper about instruction-set architecture simulators. In
>> first time, I used gcc-4.4.0 and the compilation time reached 33
>> minutes (with -O3) for my simulator and the performance reached 270
>> MIPS (Million instruction per second). When I used the gcc-4.4.4, in
>> the same code, the compilation time reached 39 seconds and the
>> performance reached 600 MIPS. My code have many "switchs" with 512
>> "cases" and the library is in use.
>> How to explain this behavior in the compilation and performance in my paper?
>
> If I'm reading this correctly, it sounds like a useful optimization fix
> in gcc 4.4.4. The compiler runs faster and generates better code.
>
> So I'm not sure what your question is. Are you asking us why gcc has
> gotten better?
>
> Ian 		 	   		  
_________________________________________________________________
Learn more ways to connect with your buddies now
http://go.microsoft.com/?linkid=9734388

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compilation time in gcc-4.4.0
  2010-07-08 20:58 Compilation time in gcc-4.4.0 Maxiwell Garcia
  2010-07-10 22:04 ` Ian Lance Taylor
@ 2010-07-13 14:50 ` Paolo Bonzini
  2010-07-13 14:53   ` Richard Guenther
  1 sibling, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2010-07-13 14:50 UTC (permalink / raw)
  To: Maxiwell Garcia; +Cc: gcc

On 07/08/2010 10:58 PM, Maxiwell Garcia wrote:
> Hi,
>
> I am writing a paper about instruction-set architecture simulators. In
> first time, I used gcc-4.4.0 and the compilation time reached 33
> minutes (with -O3) for my simulator and the performance reached 270
> MIPS (Million instruction per second). When I used the gcc-4.4.4, in
> the same code, the compilation time reached 39 seconds and the
> performance reached 600 MIPS. My code have many "switchs" with 512
> "cases" and the library<systemc.h>  is in use.
> How to explain this behavior in the compilation and performance in my paper?

Try -ftime-report, it should explain the compilation time change.  Such 
a dramatic performance change is usually due to better register 
allocation, but this is just a guess.

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compilation time in gcc-4.4.0
  2010-07-13 14:50 ` Paolo Bonzini
@ 2010-07-13 14:53   ` Richard Guenther
  2010-07-13 15:31     ` Paolo Bonzini
  2010-07-13 15:31     ` Paolo Bonzini
  0 siblings, 2 replies; 8+ messages in thread
From: Richard Guenther @ 2010-07-13 14:53 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Maxiwell Garcia, gcc

On Tue, Jul 13, 2010 at 4:50 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 07/08/2010 10:58 PM, Maxiwell Garcia wrote:
>>
>> Hi,
>>
>> I am writing a paper about instruction-set architecture simulators. In
>> first time, I used gcc-4.4.0 and the compilation time reached 33
>> minutes (with -O3) for my simulator and the performance reached 270
>> MIPS (Million instruction per second). When I used the gcc-4.4.4, in
>> the same code, the compilation time reached 39 seconds and the
>> performance reached 600 MIPS. My code have many "switchs" with 512
>> "cases" and the library<systemc.h>  is in use.
>> How to explain this behavior in the compilation and performance in my
>> paper?
>
> Try -ftime-report, it should explain the compilation time change.  Such a
> dramatic performance change is usually due to better register allocation,
> but this is just a guess.

I would guess it was the various backports of tree PRE fixes actually.

Richard.

> Paolo
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compilation time in gcc-4.4.0
  2010-07-13 14:53   ` Richard Guenther
@ 2010-07-13 15:31     ` Paolo Bonzini
  2010-07-13 15:31     ` Paolo Bonzini
  1 sibling, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-07-13 15:31 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Maxiwell Garcia, gcc

On 07/13/2010 04:53 PM, Richard Guenther wrote:
> On Tue, Jul 13, 2010 at 4:50 PM, Paolo Bonzini<bonzini@gnu.org>  wrote:
>> On 07/08/2010 10:58 PM, Maxiwell Garcia wrote:
>>>
>>> Hi,
>>>
>>> I am writing a paper about instruction-set architecture simulators. In
>>> first time, I used gcc-4.4.0 and the compilation time reached 33
>>> minutes (with -O3) for my simulator and the performance reached 270
>>> MIPS (Million instruction per second). When I used the gcc-4.4.4, in
>>> the same code, the compilation time reached 39 seconds and the
>>> performance reached 600 MIPS. My code have many "switchs" with 512
>>> "cases" and the library<systemc.h>    is in use.
>>> How to explain this behavior in the compilation and performance in my
>>> paper?
>>
>> Try -ftime-report, it should explain the compilation time change.  Such a
>> dramatic performance change is usually due to better register allocation,
>> but this is just a guess.
>
> I would guess it was the various backports of tree PRE fixes actually.

Sorry, I was referring to the change in performance which I justified by 
better register allocation.  PRE is indeed a good candidate for the 
compilation time fixes.

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compilation time in gcc-4.4.0
  2010-07-13 14:53   ` Richard Guenther
  2010-07-13 15:31     ` Paolo Bonzini
@ 2010-07-13 15:31     ` Paolo Bonzini
  2010-07-13 20:33       ` Richard Guenther
  1 sibling, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2010-07-13 15:31 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Maxiwell Garcia, gcc

On 07/13/2010 04:53 PM, Richard Guenther wrote:
> On Tue, Jul 13, 2010 at 4:50 PM, Paolo Bonzini<bonzini@gnu.org>  wrote:
>> On 07/08/2010 10:58 PM, Maxiwell Garcia wrote:
>>>
>>> Hi,
>>>
>>> I am writing a paper about instruction-set architecture simulators. In
>>> first time, I used gcc-4.4.0 and the compilation time reached 33
>>> minutes (with -O3) for my simulator and the performance reached 270
>>> MIPS (Million instruction per second). When I used the gcc-4.4.4, in
>>> the same code, the compilation time reached 39 seconds and the
>>> performance reached 600 MIPS. My code have many "switchs" with 512
>>> "cases" and the library<systemc.h>    is in use.
>>> How to explain this behavior in the compilation and performance in my
>>> paper?
>>
>> Try -ftime-report, it should explain the compilation time change.  Such a
>> dramatic performance change is usually due to better register allocation,
>> but this is just a guess.
>
> I would guess it was the various backports of tree PRE fixes actually.

Sorry, I was referring to the change in performance which I justified by 
better register allocation.  PRE is indeed a good candidate for the 
compilation time fixes.  Could the changes to PRE cause different code 
to be generated?

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compilation time in gcc-4.4.0
  2010-07-13 15:31     ` Paolo Bonzini
@ 2010-07-13 20:33       ` Richard Guenther
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Guenther @ 2010-07-13 20:33 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Maxiwell Garcia, gcc

On Tue, Jul 13, 2010 at 5:26 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 07/13/2010 04:53 PM, Richard Guenther wrote:
>>
>> On Tue, Jul 13, 2010 at 4:50 PM, Paolo Bonzini<bonzini@gnu.org>  wrote:
>>>
>>> On 07/08/2010 10:58 PM, Maxiwell Garcia wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am writing a paper about instruction-set architecture simulators. In
>>>> first time, I used gcc-4.4.0 and the compilation time reached 33
>>>> minutes (with -O3) for my simulator and the performance reached 270
>>>> MIPS (Million instruction per second). When I used the gcc-4.4.4, in
>>>> the same code, the compilation time reached 39 seconds and the
>>>> performance reached 600 MIPS. My code have many "switchs" with 512
>>>> "cases" and the library<systemc.h>    is in use.
>>>> How to explain this behavior in the compilation and performance in my
>>>> paper?
>>>
>>> Try -ftime-report, it should explain the compilation time change.  Such a
>>> dramatic performance change is usually due to better register allocation,
>>> but this is just a guess.
>>
>> I would guess it was the various backports of tree PRE fixes actually.
>
> Sorry, I was referring to the change in performance which I justified by
> better register allocation.  PRE is indeed a good candidate for the
> compilation time fixes.  Could the changes to PRE cause different code to be
> generated?

Yes, they will generally cause more PRE to be performed.  What ends up
generating the noticeable performance difference depends on the specific
testcase though - and it might very well be RA (and 4.4.0 to 4.4.4 is a
significant amount of changes).

Richard.

> Paolo
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-07-13 20:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-08 20:58 Compilation time in gcc-4.4.0 Maxiwell Garcia
2010-07-10 22:04 ` Ian Lance Taylor
2010-07-13  3:12   ` BLUE 3TOO
2010-07-13 14:50 ` Paolo Bonzini
2010-07-13 14:53   ` Richard Guenther
2010-07-13 15:31     ` Paolo Bonzini
2010-07-13 15:31     ` Paolo Bonzini
2010-07-13 20:33       ` Richard Guenther

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).