Multiple choice

Which of the following means 'reduction in strength'?

  1. Removing loop invariant computation

  2. Replacing run-time computation by compile time computation

  3. Removing common sub-expressions

  4. Replacing a costly operation by a relatively cheaper one

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Strength reduction is a compiler optimization technique where expensive operations (such as multiplication or division) are replaced by cheaper equivalent operations (such as bit shifting or addition).