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

Optimize the WASI random_get implementation. #4917

Merged

Conversation

sunfishcode
Copy link
Member

Use StdRng instead of the OsRng in the default implementation of random_get. This uses a userspace CSPRNG, making random_get 3x faster in simple benchmarks.

Use `StdRng` instead of the `OsRng` in the default implementation of
`random_get`. This uses a userspace CSPRNG, making `random_get` 3x faster
in simple benchmarks.
@github-actions github-actions bot added the wasi Issues pertaining to WASI label Sep 16, 2022
@github-actions
Copy link

Subscribe to Label Action

cc @kubkon

This issue or pull request has been labeled: "wasi"

Thus the following users have been cc'd because of the following labels:

  • kubkon: wasi

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@github-actions github-actions bot added the wasmtime:c-api Issues pertaining to the C API. label Sep 16, 2022
@github-actions
Copy link

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasmtime:c-api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:c-api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton alexcrichton merged commit cbd2efd into bytecodealliance:main Sep 16, 2022
@sunfishcode sunfishcode deleted the sunfishcode/optimize-random-get branch September 16, 2022 15:27
afonso360 pushed a commit to afonso360/wasmtime that referenced this pull request Sep 21, 2022
* Optimize the WASI `random_get` implementation.

Use `StdRng` instead of the `OsRng` in the default implementation of
`random_get`. This uses a userspace CSPRNG, making `random_get` 3x faster
in simple benchmarks.

* Update cargo-vet audits for cap-std 0.25.3.

* Update all cap-std packages to 0.25.3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasi Issues pertaining to WASI wasmtime:c-api Issues pertaining to the C API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants