From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199705201210.IAA08631@vlsi12.gsfc.nasa.gov> Date: 20 May 1997 14:57:50 +0200 From: Martin Ostermann Subject: Re: 500 MHz 21164 vs P166 ?! Stephan Kanthak writes: > >Try '-funroll-loops'. This often helps, and it isn't turned on by any > >-O level. Also avoid unnecessary float/integer conversions. > I remember Linus saying that '-funroll-all-loops' makes Alphas much slower > because small loops do no longer fit into L1/L2 cache. Is this true for > '-funroll-loops', too, or does GCC unroll loops then with respect to L1/L2 > cache size? 'don't know about the cache issue, but citing the gcc info pages: `-funroll-loops' Perform the optimization of loop unrolling. This is only done for loops whose number of iterations can be determined at compile time or run time. `-funroll-loop' implies both `-fstrength-reduce' and `-frerun-cse-after-loop'. `-funroll-all-loops' Perform the optimization of loop unrolling. This is done for all loops and usually makes programs run more slowly. `-funroll-all-loops' implies `-fstrength-reduce' as well as `-frerun-cse-after-loop'. I indeed never got an performance increase with '-funroll-all-loops'. However, I measured an about 10% performace increase (21064/Jensen) by using '-funroll-loops' on povray. And that's just one example. Depending how tight the inner loops are, it can be much better. But it might be a good idea to use profiling and only to apply this option on certain files. Martin -- Martin Ostermann | mailto:ost@comnets.rwth-aachen.de Communication Networks | http://www.comnets.rwth-aachen.de/~ost Aachen University of Technology | phoneto:++49/241/807917 Germany | faxto:++49/241/8888242 -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com