Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide random number generators without locks #11

Open
MBradbury opened this issue Mar 30, 2014 · 1 comment
Open

Provide random number generators without locks #11

MBradbury opened this issue Mar 30, 2014 · 1 comment

Comments

@MBradbury
Copy link

It would be nice if the random number generators could be provided without locks. In my simulations there is a single RNG per thread, so the locks are simply overhead. Removing the locks gets me about a 20% speed improvement (in a naive test).

@slandelle
Copy link

Just to let you know: we have a benchmark here where we forked CellularAutomatonRNG and MersenneTwisterRNG to remove the ReentrantLocks and I confirm the performance boost (if of course you can afford ThreadLocals).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants