Re:Mispredicted branches can multiply your running times
by omgtehlion on Wednesday October 16, 2019 @10:26AM
(#21270673)
> https://github.com/kstenerud/bit-tricks/blob/master/bytes_re...
looks like over-engineering of (bits + 7) >> 3
Re:Mispredicted branches can multiply your running times
by skrimp on Wednesday October 16, 2019 @03:40PM
(#21274597)
Your solution can overflow.
Re:Mispredicted branches can multiply your running times
by omgtehlion on Wednesday October 16, 2019 @05:55PM
(#21276347)
this won't: (bits + 7LL) >> 3
Re:Mispredicted branches can multiply your running times
by jacobolus on Wednesday October 16, 2019 @01:29PM
(#21272956)
In https://github.com/kstenerud/bit-tricks/blob/master/sign.h
Why not use: (x > 0) - (x < 0)
[1] https://github.com/kstenerud/bit-tricks