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:

    Hollywood keeps before its child audiences a string of glorified young heroes, everyone of whom is an unhesitating and violent Anarchist. His one answer to everything that annoys him or disparages his country or his parents or his young lady or his personal code of manly conduct is to give the offender a “sock” in the jaw.... My observation leads me to believe that it is not the virtuous people who are good at socking jaws.
    George Bernard Shaw (1856–1950)

    Thence, flow! conceit and motion to rehearse
    Pastoral terrors of youth still in the man,
    Torsions of sleep, in emblematic verse
    Rattling like dice unless the verse shall scan
    All chance away....
    Allen Tate (1899–1979)