Re: Selective Computation...

Saru <>
30 Dec 2002 23:55:28 -0500

          From comp.compilers

Related articles
Selective Computation... (Saru) (2002-12-26)
Re: Selective Computation... (Saru) (2002-12-30)
Re: Selective Computation... (Saru) (2002-12-30)
Re: Selective Computation... (Joachim Durchholz) (2002-12-31)
Re: Selective Computation... (2003-01-17)
Re: Selective Computation... (Patrick Volteau) (2003-01-20)
Re: Selective Computation... (John R. Strohm) (2003-01-21)
Re: Selective Computation... (Andreas Gieriet) (2003-01-21)
[2 later articles]
| List of all articles for this month |

From: Saru <>
Newsgroups: comp.compilers
Date: 30 Dec 2002 23:55:28 -0500
Organization: Ye 'Ol Disorganized NNTPCache groupie
References: 02-12-116
Keywords: optimize
Posted-Date: 30 Dec 2002 23:55:28 EST

Hello again,

    > If you can combine k1, k2, and k3 into a three bit mask that can
      > take on the values 0 to 7, you could use a switch that would compile
      > into an indirect jump that is usually rather fast. If you really want
      > to speed things up and k1,k2,k3 don't change in the loop, write three
      > versions of the loop and at runtime pick the appropriate one to
use. [-John]

Many thanks for the reply. May be I should be more clear about this
computation. The computation of X is inside a nested loop. The values of
p, q, p', q', k1, k2 and k3 are partly array based computations
(accessed with the help of loop induction variables) and none of them
are compile-time constants, neither they change in a predictable way (so
far). In other words, inside the loop (the trip count may range from
2000 to 400000 or even more), the values of k1, k2 and k3 change very
often. Now I am puzzled, how do I make three different loops so that the
correct loop can be picked up at runtime?. Any help please?. I can
submit a sample code, if the above is not clear enough.

Thanks again.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.