Lol -- "Like cttz, but extra-unsafe (...)" https://doc.rust-lang.org/std/intrinsics/fn.cttz_nonzero.html …
-
-
and now you made me look up intrinsics
how about bsr for your "trailing ones" problem? https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=bit_scan&expand=392,393,400,401 … -
Hmm, if I'm reading that correctly it would return a different result. E.g. 0b0101 Result: 3 Expected: 1
- 4 more replies
New conversation -
-
-
Woah; it seems there's precedence for a similar change already! The difference for `.count_zeros()`, and `.count_ones()` is an extra `not` instruction. Just like it'd be if a `.trailing_ones()` method would be added!* https://godbolt.org/z/ArBv8P pic.twitter.com/Y16FdiGncC
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.