(B) code optimization using cheaper machine instructions.
(C) reducing efficiency of program.
(D) None of the above
Answer (B).
In software engineering, strength reduction is a compiler optimization technique where expensive operations are replaced with equivalent but less expensive operations. The classic example of strength reduction converts "strong" multiplications inside a loop into "weaker" additions – something that frequently occurs in array addressing. Examples of strength reduction include:
• replacing a multiplication within a loop with an addition
• replacing an exponentiation within a loop with a multiplication
Nice explaination.
ReplyDelete