>> It seems that the goto-based version leads to different static branch >> prediction results, which happen to be favorable. > > It has nothing to do with branch prediction. I know > it is determined ENTIRELY by stack use. In both cases, The C compiler emits code which doesn't use the stack.