Skip to content

Strength Reduction

strength reduction은 타겟 머신에서 무거운(expensive) 연산을 가벼운(cheap) 연산으로 바꾸는 컴파일러 최적화 기법을 말한다. 쉬운 예로, 곱하기 연산을 더하기 연산으로 바꾸는 경우를 들 수 있다.

썬 마이크로시스템즈에서 나온 다음 논문(Operator Strength Reduction)에 자세한 설명이 있다.

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.

Favorite site