3 ms·
Dumb question: Why not just use AES? Most platforms have hardware acceleration so it should be pretty fast. Then there's no worrying about output quality. (Is
by spekcular 5y ago
Dumb question: Why not just use AES? Most platforms have hardware acceleration so it should be pretty fast. Then there's no worrying about output quality.
(Is there an application for which AES is not fast enough? Has it been benchmarked for speed against the various PRNG options?)
- jandrewrogers 5y agoPortability, 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.
- pcwalton 5y agoUsing AES-NI for small integer hashing in the Rust compiler was found to result in a measurable slowdown.
- oconnor663 5y agoI 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.