Operator strength reduction involves using mathematical identities to replace slow math operations with faster operations. Examples of this include: replacing integer division or multiplication by a power of 2 with a shift operation, replacing integer division by a constant with reciprocal multiplication, and replacing integer multiplication by a constant with a combination of shifts, adds or subtracts. The cost and benefits will depend highly on the target CPU and sometimes on the surrounding code (depending on availability of other functional units within the CPU).
|original calculation||replacement calculation|
|y = x / 8||y = x >> 3|
|y = x * 64||y = x << 6|
|y = x * 2.0||y = x + x|
|y = x * 15||y = (x << 4) - x|
Induction variable or recursive strength reduction replaces a function of some systematically changing variable with a simpler calculation using previous values of the function. In a procedural programming language this would apply to an expression involving a loop variable and in a declarative language it would apply to the argument of a recursive function. E.g.
f x = ... (2 ** x) ... (f (x + 1)) ...
f x = f' x (2 ** x)
f' x z = ... z ... (f' (x + 1) (2 * z)) ...
Here the expensive operation (2 ** x) has been replaced by the cheaper (2 * z) in the recursive function f'. This maintains the invariant that z = 2 ** x for any call to f'.
Patent Issued for High-Strength Steel Plate Resistant to Strength Reduction Resulting from Stress Relief Annealing and Excellent in Weldability
Feb 13, 2013; According to news reporting originating from Alexandria, Virginia, by VerticalNews journalists, a patent by the inventors...
WEST INTRODUCES LIMITED END STRENGTH REDUCTION ACT LEGISLATION ASSURES MILITARY DRAWDOWN IS SAFE AND RESPONSIBLE.
Mar 31, 2012; WASHINGTON -- The following information was released by the office of Florida Rep. Allen West: Congressman Allen West (R-FL)...
Three-dimensional stability evaluation of a preexisting landslide with multiple sliding directions by the strength-reduction technique.
Mar 01, 2007; Abstract: Landslide 1 is located on the right bank of the downstream side of the dam for Hongjiadu Hydropower Station in Guizhou...