Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
Dylan16807
4y ago
0 comments
Share
"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.
0 comments
default
newest
oldest
rustybolt
4y 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.
j
/
k
navigate · click thread line to collapse