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

Randomness go brrr #42

Open
oscbyspro opened this issue Feb 10, 2023 · 1 comment
Open

Randomness go brrr #42

oscbyspro opened this issue Feb 10, 2023 · 1 comment
Labels
await can't be done yet brrr such code, much wow

Comments

@oscbyspro
Copy link
Owner

oscbyspro commented Feb 10, 2023

I'm adding some RNG benchmarks, suspecting that it's slow. As I look at the profiler, however, 87.4% of the time is spent calling SystemRandomNumberGenerator.next() and my code accounts for 10.6%. So my input is kind of pointless, until something like An API for bulk random bytes is added. The story may be different for other RNGs, but I have not tested it.

@oscbyspro oscbyspro added brrr such code, much wow await can't be done yet labels Feb 10, 2023
@oscbyspro
Copy link
Owner Author

oscbyspro commented Feb 10, 2023

I'm toying with the idea of adding a [from/with]UnsafeMutableBytes(_:) protocol.

@oscbyspro oscbyspro changed the title Randomness go brrr Randomness go brrr Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
await can't be done yet brrr such code, much wow
Projects
None yet
Development

No branches or pull requests

1 participant