Profiling indicates the size-check isn't hoisted properly. In this case, manually hoising the loop invariant doesn't negatively impact clarity nor give any more noise, and slightly improves performance.