|
|
|
|
|
by teo_zero
1144 days ago
|
|
Except that arr[...] - value may overflow, and is UB in C. Even removing the UB with something like __builtin_sub_overflow(), if arr[...] is INT_MAX and value is -2, then the difference will have the high bit set! I haven't tried it, but this should compile to a cmove or seta, not a jump: int cond = arr[step+begin] < value;
begin += step & -cond;
|
|