Closed brimonk closed 1 year ago
Currently, Game::roll makes a new std::random_device for every die that gets rolled.
Game::roll
std::random_device
https://github.com/cgsdev0/rollycubes/blob/main/src/Game.cpp#L324
While it's implementation dependent, it seems like at the least this should be promoted to one instance per Game. If you're really nuts, you could make it one instance per thread / process.
Currently,
Game::roll
makes a newstd::random_device
for every die that gets rolled.https://github.com/cgsdev0/rollycubes/blob/main/src/Game.cpp#L324
While it's implementation dependent, it seems like at the least this should be promoted to one instance per Game. If you're really nuts, you could make it one instance per thread / process.