Hacker News new | ask | show | jobs
by mrec 1890 days ago
The author discusses this in the corresponding /r/rust thread:

https://www.reddit.com/r/rust/comments/mvc6o5/incredibly_fas...

tl;dr: it's not straightforward, mostly because the standard functionality lives in `core` which doesn't have access to OS support for CPU feature detection.

1 comments

Does Rust allow for libraries to “override” core functionality when available?
If it was all userspace Rust, it would have been possible to choose the implementation at compile time conditional on the presence of std.