Y
Hacker News
new
|
ask
|
show
|
jobs
by
Dylan16807
1588 days ago
"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.
1 comments
rustybolt
1588 days ago
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.
link