hosseinmoein / DataFrame

C++ DataFrame for statistical, Financial, and ML analysis -- in modern C++ using native types and contiguous memory storage
https://hosseinmoein.github.io/DataFrame/
BSD 3-Clause "New" or "Revised" License
2.41k stars 306 forks source link

PCG RNG for speed without compromising on spectral characteristics. #219

Closed ttbek closed 1 year ago

ttbek commented 1 year ago

You do use Mersenne Twister, which is good. It's more than can be said for a lot of other projects. It is a bit slower than some of the other generators and I saw you wrote in the readme that much of the time in the example is taken up by the RNG. Have you considered the PCG library? It is both fast and statistically random. I've been using it several years now and the igraph library folk have also started using it.

https://www.pcg-random.org/ https://github.com/imneme/pcg-cpp

I guess this is more of a potential enhancement than a real issue, Mersenne Twister is usually good enough.

hosseinmoein commented 1 year ago

Thanks for the comment. Yeah, I have not paid much attention to RNG so far. But I will take a look