3 ms·
If the compiler doesn't optimize the if(cmp(...)) first += length + rem; perhaps a sign operation could be used when cmp returns a number. Something along the l
by tgv 3y ago
If the compiler doesn't optimize the if(cmp(...)) first += length + rem; perhaps a sign operation could be used when cmp returns a number. Something along the lines of:
first += (length + rem) * ((sign(cmp(...)) + 1) / 2)
Has anyone tried that? DDG isn't very helpful.