Open
Description
I think it may be useful to have
fill
methods foru32
/u64
. In some (AFAIK relatively rare) cases they may result in a significant acceleration, especially for PRNGs like ChaCha which can use SIMD to produce several blocks in parallel. Also they should result in less memory stores if a PRNG state can fit into registers. Those methods could replace thenext_*
methods, by marking the fill methods#[inline]
the&mut [T; 1]
case should be trivially optimizable by compiler. And it also should be possible to introduce them gradually (introduce them implemented in terms ofnext_*
first, then marknext_*
methods deprecated, and eventually remove them in the next breaking release), limiting the migration churn.
It may be worth trying this.
Metadata
Metadata
Assignees
Labels
No labels