Hacker News new | ask | show | jobs
by infiniteregrets 485 days ago
(S2 dev) I think it took a bit of time to figure out what was going on as it was more of a game of enabling a feature in the sha2 crate since the profile showed us that it was using `soft` while we needed the hardware optimized. We thought being on neoverse-v1 would automatically detect to use hardware optimization, but that wasn't the case and we ended up looking at the sha2 crate closely only to figure that enabling the asm feature fixes it!
2 comments

We were looking at the main branch of the sha2 crate at first, where the 'asm' feature has been removed (but this is unreleased, will be in 0.11.x) https://github.com/RustCrypto/hashes/blob/master/sha2/CHANGE...
Cool, makes you wonder how many more of these oneliners are scattered across the codebase (in application and also OS etc).

Sidenote, I wonder how close we are to detect these automatically. From profiling many various applications, it feels like that should be a tractable problem.