recategorized by
9,395 views

2 Answers

1 votes
1 votes

Answer must be D)  Loop Jamming

Let us examine each option:

A) Loop unrolling: The number of jumps can be reduced by replicating the body of the loop if the number of iterations is found to be constant (that is, the number of iterations is known at compile time). 

If body of loop is big, unrolling is not favorable.

B) Strength reduction: Replacing an expensive operation with an equivalent cheaper operation is called strength reduction. For example, the * operator can be replaced by a lower strength operator +. 


 

edited by
1 votes
1 votes

Ans is D

In computer scienceloop fusion (or loop jamming) is a compiler optimization and loop transformation which replaces multiple loops with a single one. It is possible when two loops iterate over the same range and do not reference each other's data.

Loop fusion does not always improve run-time speed. On some architectures, two loops may actually perform better than one loop because, for example, there is increased data locality within each loop. In these cases, a single loop may be transformed into two, which is called loop fission.

Answer:

Related questions

4 votes
4 votes
1 answer
3