-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Using a state vector containing the information of 4 seeds, we could provide a new API where we get 4 random numbers at a time (using SIMD instructions for example).
The state vector would have to be "interleaved" to optimize cache usage, so that when reading or writing 4 elements, we read or write contiguous memory.
(I use the number 4 but it could be a different number depending on the Variate type (to build a double we need 2 Word32), and on the vectorization primitives available.)
I'm not familiar with haskell vector primitives but looking at GHC.Exts I saw some there, so I guess it is possible to go this way... What do you think?
Metadata
Metadata
Assignees
Labels
No labels