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

perf: Optimise from_rng impl for WyRand #15

Merged
merged 2 commits into from
Jul 22, 2024
Merged

perf: Optimise from_rng impl for WyRand #15

merged 2 commits into from
Jul 22, 2024

Conversation

Bluefinger
Copy link
Owner

Improve the performance of from_rng considerably for thread_rng usages, as well as when seeding from small/quick PRNG sources.

When creating a new WyRand instance from thread_rng, the performance of from_rng has gone from 6.8ns to 3ns, a 56.3% improvement. The difference for quicker PRNGs is less, but still a nice improvement to have.

@Bluefinger Bluefinger added the enhancement New feature or request label Jul 22, 2024
@Bluefinger Bluefinger merged commit 89ee257 into main Jul 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant