News for hackers. Stuff that matters.
Re:Finding the average of two unsigned integers without over... by Dylan16807 on Tuesday February 08, 2022 @12:00AM (#30255052)
"just"? That's 2 additions, 2 shifts, and 2-3 bitwise operations, while the other method is 1 addition, 1 shift, and 2 bitwise operations.
Re:Finding the average of two unsigned integers without over... by rustybolt on Tuesday February 08, 2022 @01:47AM (#30255596)
I would think optimizing compilers can optimize this expression to the one in the article, but I tried it on godbolt and they don't.