kyonifer / koma

A scientific computing library for Kotlin. https://kyonifer.github.io/koma
Other
270 stars 23 forks source link

RNG should support concurrent generation #88

Open kyonifer opened 5 years ago

kyonifer commented 5 years ago

For some applications such as Monte-Carlo, random number generation can be the bottleneck in performance. It would be useful to support a concurrent RNG that can generate numbers in multiple threads (probably using a fork join pool and/or coroutines) using all available cores and zip them back into a single stream for the requesting thread. This would probably only make sense for large arrays, so a hybrid single/multi-threaded approach may be appropriate.