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]

Re: loop optimizations, mark 10


[ This is probably my last message on this subject ]

Some comparisons with our Numerical Weather Prediction code (all  
timings on m68k-next-nextstep3):

egcs-980525 + your mark 10 patches + options -O2 -fforce-addr  
-frerun-loop-opt:

0SUPOBS TOOK :       19.16738891602
0DATACH TOOK :      9394.4453125000
0ANAEVA TOOK :     11219.6298828125
0GRPEVA TOOK :     22909.3183593750
0HUMSUP TOOK :        1.59375000000
0DATACH TOOK :       561.9335937500
0HUMEVA TOOK :       289.8359375000
0GRPEVA TOOK :       385.1132812500
 PREPARATIONS TOOK         50.3405 SECONDS
 FORECAST TOOK        275.0771 SECONDS
 PREPARATIONS TOOK         54.5229 SECONDS
 FORECAST TOOK      31895.1133 SECONDS

egcs-980525 + your mark 10 patches + options -O2 -fforce-addr:

0SUPOBS TOOK :       19.40332031250
0DATACH TOOK :      9168.3730468750
0ANAEVA TOOK :     11292.7128906250
0GRPEVA TOOK :     22931.8886718750
0HUMSUP TOOK :        1.70312500000
0DATACH TOOK :       548.6484375000
0HUMEVA TOOK :       290.1132812500
0GRPEVA TOOK :       386.9453125000
 PREPARATIONS TOOK         50.4651 SECONDS
 FORECAST TOOK        283.2216 SECONDS
 PREPARATIONS TOOK         54.9264 SECONDS
 FORECAST TOOK      32305.3301 SECONDS

egcs-980520 + options -O2 -fforce-addr (-frerun-loop-opt implicit):

0SUPOBS TOOK :       19.66827392578
0DATACH TOOK :      9275.4941406250
0ANAEVA TOOK :     11315.5214843750
0GRPEVA TOOK :     23142.7968750000
0HUMSUP TOOK :        1.60937500000
0DATACH TOOK :       581.2851562500
0HUMEVA TOOK :       289.7539062500
0GRPEVA TOOK :       385.1562500000
 PREPARATIONS TOOK         48.5590 SECONDS
 FORECAST TOOK        278.5487 SECONDS
 PREPARATIONS TOOK         53.5047 SECONDS
 FORECAST TOOK      32280.9922 SECONDS

So there's not that much difference, and worse, it is not decisive  
(for or against including -frerun-loop-opt, for or against your  
patches).

However, the m68k is perhaps the wrong architecture to benefit from  
this.  Surely it has few integer registers (though more than the  
ix86), but it has quirks that preclude the easy rule:  Combining  
givs is always beneficial.

1. Using large offsets (>32786 bytes) is expensive, so if there's a
   separate register available, using it is cheaper.

2. Updating the register containing the giv is free (postincrement
   addressing mode).

For most other architectures supported by egcs, the benefits will  
be real, I suppose (I can't test it on the Alpha I have access to,  
because that's still running RedHat 4.2, which can't link f771).

HTH,
Toon.

PS:  How was Linux Expo ?


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