Using AES-NI for small integer hashing in the Rust compiler was found to result in a measurable slowdown.
Re:Designing a New PRNG
by oconnor663 on Monday December 20, 2021 @07:33PM
(#29632337)
I think the biggest gains from AES-NI are when you can use the vectorized versions. So random byte generation would benefit, but small integer hashing probably not? (Unless you could arrange to hash a vector of integers at once.) But this isn't something I've tried myself.
Re:Designing a New PRNG
by jandrewrogers on Monday December 20, 2021 @06:00PM
(#29631627)
Portability, most likely. I've seen AES-NI used as a convenient and fast PRNG but it would be a pretty sub-optimal choice for hardware platforms that don't have hardware acceleration.
(Is there an application for which AES is not fast enough? Has it been benchmarked for speed against the various PRNG options?)