News for hackers. Stuff that matters.
Re:Mispredicted branches can multiply your running times by kstenerud on Wednesday October 16, 2019 @06:48AM (#21268971)
This is the main reason why I've codified a bunch of bit tricks so I don't forget them [1]. They're often not worth using, but can sometimes work as a last-mile optimization after you've done all your algorithmic changes, cache locality, sizing, alignment, etc.

[1] https://github.com/kstenerud/bit-tricks

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)