vendredi 26 juillet 2019

C++: Performance for drawing random boolean values

I am drawing random boolean numbers with

std::mt19937 rng;
std::uniform_int_distribution<int> dis(0, 1);

In extreme cases, drawing these numbers can take up to 40% of the CPU time of my process. Is there any way to make this faster?




Aucun commentaire:

Enregistrer un commentaire