https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94781

--- Comment #5 from ishikawa,chiaki <ishikawa at yk dot rim.or.jp> ---
Thank you for your comment.

(In reply to Richard Biener from comment #4)
> The time-report you attached is mostly flat and I don't see anything
> eye-popping pointing at a regression.  With -O0 my GCC9 is faster (well,
> noise).

I was concerned with the ELAPSED time, and 
I notice that, in my testing, "phase last asm" of v9 and v8 spent a tad long
time than v7.

v9
phase last asm                     :   6.03 (  5%)   0.24 (  2%)  19.07 ( 12%) 
127204 kB (  2%)

v8
 phase last asm                     :   5.62 (  4%)   0.24 (  2%)  15.43 ( 10%)
 103215 kB (  2%)

v7
phase last asm          :   4.03 ( 3%) usr   0.16 ( 1%) sys   6.51 ( 5%) wall 
101000 kB ( 2%) ggc

v9 spends more than 12 seconds and v8 spends about 9 seconds longer than v7.
But I am not sure what this "phase last asm" does and why it spends more
ELAPSED time in v9 and v8 than in v7.


> Confirmed for -O2:
> 
> > /usr/bin/time /space/rguenther/install/gcc-7.5/bin/g++ -S 
> > UnifiedBindings23-v7.cpp -std=gnu++1z -w -O2
> 112.50user 1.83system 2:01.65elapsed 93%CPU (0avgtext+0avgdata
> 2732664maxresident)k
> 1952inputs+36528outputs (6major+678054minor)pagefaults 0swaps
> > /usr/bin/time /space/rguenther/install/gcc-8.4/bin/g++ -S 
> > UnifiedBindings23-v7.cpp -std=gnu++1z -w -O2
> 83.44user 1.27system 1:26.34elapsed 98%CPU (0avgtext+0avgdata
> 2789396maxresident)k
> 48640inputs+41088outputs (62major+687702minor)pagefaults 0swaps
> > /usr/bin/time /space/rguenther/install/gcc-9.3/bin/g++ -S 
> > UnifiedBindings23-v7.cpp -std=gnu++1z -w -O2
> 128.28user 1.90system 2:19.51elapsed 93%CPU (0avgtext+0avgdata
> 2695708maxresident)k
> 
> Note how my GCC 8 build is significantly faster than GCC 7!

Hmm... 

Did you use special flag to create your compiler?

I am using AMD Ryzen 7 1700 eight core CPU (my linux runs inside VirtualBox
image under Windows 10 and it is assigned 7 virtual CPU core.).
Maybe I need to build my own G++ compiler tuned for AMD Ryzen 7 if you used a
special compiler flags when you built your V8 and V9 compiler because the
elapsed time difference between v7 and v9 is rather smallish in comparison to
the difference I observed on my PC (module the option difference.)

> 
> note that this kind of regression can easily happen because we generate
> more code because of some different optimization decisions.  For example
> the GCC 8 generated object is
> 
> > size UnifiedBindings23-v7.o
>    text    data     bss     dec     hex filename
> 2502864   10136   37392 2550392  26ea78 UnifiedBindings23-v7.o
> 
> while GCC 9 generates
> 
> > size UnifiedBindings23-v7.o
>    text    data     bss     dec     hex filename
> 2788944   16488   37392 2842824  2b60c8 UnifiedBindings23-v7.o
> 
> I realize I didn't use the full set of options you did (in particular I
> omitted
> -g).  

The few extra options I needed to omit for v7 and v8 might explain the 
slow down. I will check for this by removing the options from v9 compilation as
well.

> My tests also seem noisy (machine isn't idle, 2nd run of the GCC 9
> compile
> dialed in at 100s)

I bet you are using very fast CPU :-)

Reply via email to