2 ms·
Exactly. I'd rather have a way that guarantees this algorithm to be branchless regardless of the compiler and underlying hardware. Although I suppose it depends
by mcv 4y ago
Exactly. I'd rather have a way that guarantees this algorithm to be branchless regardless of the compiler and underlying hardware. Although I suppose it depends on the underlying hardware whether or not being branchless offers any advantage at all.
Of course compilers should be optimising for the hardware they're compiling for, but this article shows that can be very hit-and-miss.