From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9705201715.AA00rzw@vb.franken.de> Date: Tue, 20 May 97 18:15:54 MET From: Volker Barthelmann Subject: Re: 500 MHz 21164 vs P166 ?! In-Reply-To: Hi, : >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? I haven't checked with gcc but usually compilers start unrolling the innermost loops and will not unroll a loop if the unrolled version exceeds a certain size. However AFAIK -funroll-all-loops basically affects only those loops where unrolling doesn't give you anything. Loop-unrolling is (almost?) always a win if you can determine the number of iterations at compile-time. If you can calculate them at loop-entry then it's often a win but can also be a loss because there's a lot of overhead calculating the number of iterations and choosing the right entry-point of the loop. Both of these cases should already be handled with -funroll-loops so the cases where -funroll-all-loops makes a difference are basically the ones where you cannot eliminate any loop tests and therefore don't save any instructions anyway. Maybe there are architectures where this increases performance but I think most current CPUs don't like it. Volker P.S.: What machine-specific options does gcc/Alpha recognize? I've read of -mieee here but couldn't find it in the man-page. Are there any other options? -- 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