Very cool. I believe that this is a very instructive piece of code to introduce in a concrete way what a compiler does to optimize your code, at least to unexperienced people like myself.
I'm very amazed by the simplicity of this example. Are there more serious optimization that can be seen with simple code?