Induction Variable - Application To Strength Reduction

Application To Strength Reduction

A common compiler optimization is to recognize the existence of induction variables and replace them with simpler computations; for example, the code above could be rewritten by the compiler as follows, on the assumption that the addition of a constant will be cheaper than a multiplication.

j = -17; for (i = 0; i < 10; ++i) { j = j + 17; }

This optimization is a special case of strength reduction.

Read more about this topic:  Induction Variable

Famous quotes containing the words application to, application, strength and/or reduction:

    “The receipt to make a speaker, and an applauded one too, is short and easy.—Take of common sense quantum sufficit, add a little application to the rules and orders of the House, throw obvious thoughts in a new light, and make up the whole with a large quantity of purity, correctness, and elegancy of style.”
    —Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)

    “The best political economy is the care and culture of men; for, in these crises, all are ruined except such as are proper individuals, capable of thought, and of new choice and the application of their talent to new labor.”
    —Ralph Waldo Emerson (1803–1882)

    “Who among us has the strength to oppose petty egoism, those petty good feelings—pity and remorse?”
    —Ivan Sergeevich Turgenev (1818–1883)

    “The reduction of nuclear arsenals and the removal of the threat of worldwide nuclear destruction is a measure, in my judgment, of the power and strength of a great nation.”
    —Jimmy Carter (James Earl Carter, Jr.)