3 ms·
I think it's actually quite elegant. The issue is that it always does two comparisons, even when one would suffice.
by huhtenberg 10y ago
I think it's actually quite elegant. The issue is that it always does two comparisons, even when one would suffice.
- Someone 10y agoDepending on how the compiler computes a>b, it may be branchless, though, and I expect that to be more important on modern CPUs.