3 ms·
Good question. As you can see in the comment in the github repo, it has no effect. https://github.com/ludi317/max/blob/master/blog/max_test.go#L12 https://githu
by ludiludi 3y ago
Good question. As you can see in the comment in the github repo, it has no effect. https://github.com/ludi317/max/blob/master/blog/max_test.go#L12 https://github.com/ludi317/max/blob/master/blog/max_test.go#...
It is there only to match the continue in the second code sample, where it is needed.
- schemescape 3y agoThanks! In that case, I have to say I'm surprised. I assumed the code generated for the loop would have an instructions that branches, so adding another branching instruction could only hurt (edit: not necessarily a lot), but apparently my intuition is wrong. I'm curious if the performance difference noted in the article happens on Intel/AMD as well...