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:

    Acknowledge your will and speak to us all, “This alone is what I will to be!” Hang your own penal code up above you: we want to be its enforcers!
    Friedrich Nietzsche (1844–1900)

    I have seen in this revolution a circular motion of the sovereign power through two usurpers, father and son, to the late King to this his son. For ... it moved from King Charles I to the Long Parliament; from thence to the Rump; from the Rump to Oliver Cromwell; and then back again from Richard Cromwell to the Rump; then to the Long Parliament; and thence to King Charles, where long may it remain.
    Thomas Hobbes (1579–1688)