Loop-invariant Code Motion

Loop-invariant Code Motion

In computer programming, loop-invariant code consists of statements or expressions (in an imperative programming language) which can be moved outside the body of a loop without affecting the semantics of the program. Loop-invariant code motion (also called hoisting or scalar promotion) is a compiler optimization which performs this movement automatically.

Read more about Loop-invariant Code Motion:  Example, Invariant Code Detection, Benefits, Further Reading

Famous quotes containing the words code and/or motion:

    Faultless honesty is a sine qua non of business life. Not alone the honesty according to the moral code and the Bible. When I speak of honesty I refer to the small, hidden, evasive meannesses of our natures. I speak of the honesty of ourselves to ourselves.
    Alice Foote MacDougall (1867–1945)

    in the mind of man,
    A motion and a spirit, that impels
    All thinking things, all objects of all thought,
    And rolls through all things.
    William Wordsworth (1770–1850)