Mettle

hoistedA call was lifted out of the loop

Reported by --explain after a verdict.

mettle explain hoisted

The callee is @pure and its arguments do not change across iterations, so the result cannot change either. It is computed once before the loop.

This is what @pure buys. Without it the compiler must assume the call could do anything, and must repeat it.

Related