Bit-level optimization quiz time again. What does this do? a & !(((a + 0x1f1f1f1f) & !(a + 0x05050505) & 0x80808080) >> 2) Note: In Rust, ! is bitwise not, in C this would be ~ but otherwise the same.
-
-
I got carried away and am writing benchmarks to replace [u8]::make_ascii_uppercase with this in the standard library
-
Ha-ha, just a little tiny bit. I love it when I finish something and can even dive into assembly language to squeeze every single CPU cycle I can out of it... Enjoy and best of luck!
- 3 more replies
New conversation -
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.