logoalt Hacker News

jcultoday at 6:43 AM0 repliesview on HN

First version has a side effect of writing to small_numbers[0] always.

The compiler probability can't optimize that in the second version.

If it wrote unconditionally and incremented only in the if then I'd guess they would compile to the same thing.