Strength Reduction
lastmod 2018-03-29created 2018-03-292 edits
Strength reduction is a compiler optimization technique that replaces expensive operations on the target machine with cheap ones. A simple example is replacing a multiplication with an addition.
The following paper from Sun Microsystems (Operator Strength Reduction) explains it in detail.
Operator strength reduction is a technique that improves compiler-generated code by reformulating
certain costly computations in terms of less expensive ones. A common case arises in array
addressing expressions used in loops. The compiler can replace the sequence of multiplies generated
by a direct translation of the address expression with an equivalent sequence of additions.