Tony Arcieri

Results 2560 comments of Tony Arcieri

It will cause a performance regression because it will call CPUID every time instead of caching the result. Try running the benchmarks on an AVX2-capable system.

Also: is there some reason you need `Argon2` itself to be const that the const constructors of `Params` don't suffice for?

I don't think there's any way to make it `const` without sacrificing performance, since it robs us of our ability to precache information about what CPU features are available

Let me look at this when I'm not on an M2 Mac and see if I can figure out what the performance hit would be.

Yeah, it's probably fine, though I do worry about painting ourselves into a corner around other potential future optimizations.

While that looks very helpful for other things, it doesn't help here

No, `#[target_feature = "avx2"]` informs the compiler that it can use that target feature, and also inline between functions annotated with the same `target_feature`(s). We already use it here: https://github.com/RustCrypto/password-hashes/blob/master/argon2/src/lib.rs#L459...

Closing as "won't fix"

I think the culprit in your project is the `ethereum_hashing` crate, which is unconditionally linking `cpufeatures`, but only actually using it on `x86_64`: https://github.com/sigp/ethereum_hashing/blob/b6b5ff2/Cargo.toml#L15 See here for usage: https://github.com/sigp/ethereum_hashing/blob/b6b5ff2d8db972ee6453a710e82aee3c638d5d82/src/lib.rs#L130 The...

@zonyitoo it looks pretty impressive but as @newpavlov said it is large and because of that hard to review, especially because it contains so many backends in a single PR....