Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
Dylan16807
4y ago
0 comments
Save
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
1 comments · 1 top-level
top
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