47 ms·
Yes: https://doc.rust-lang.org/core/intrinsics/fn.ctpop.html https://doc.rust-lang.org/core/intrinsics/fn.ctpop.html https://doc.rust-lang.org/std/?search=cou
by MaulingMonkey 6y ago
Yes:
https://doc.rust-lang.org/core/intrinsics/fn.ctpop.html https://doc.rust-lang.org/core/intrinsics/fn.ctpop.html
https://doc.rust-lang.org/std/?search=count_ones https://doc.rust-lang.org/std/?search=count_ones
There are still use cases for raw assembly untouched by the optimizer - e.g. constant time cryptography functions designed to thwart timing attacks might desire control over the exact instruction stream. Although, most of that can be tackled with out-of-line assembly - as one must do with x64 MSVC for example.