2 ms·
It has to make a decision to jump over the print sequence or not, whereas without the print it can eliminate the branch with a conditional move and only have to
by projektfu 3y ago
It has to make a decision to jump over the print sequence or not, whereas without the print it can eliminate the branch with a conditional move and only have to predict the loop variable. It just makes a bad guess as to whether branch prediction or conditional move will be faster, as explained above by tylerhou.