Skip to content

use BTreeMap instead of HashMap in async_support::FutureState #1339

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

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

dicej
Copy link
Collaborator

@dicej dicej commented Jul 16, 2025

As of this writing, initializing the default hasher for HashMap requires calling wasi_snapshot_preview1:random_get, which requires initializing the wasi_snapshot_preview1 adapter when targeting wasm32-wasip2 and later, and that's expensive enough that we'd prefer to avoid it for apps which otherwise make no use of the adapter.

As of this writing, initializing the default hasher for `HashMap` requires
calling `wasi_snapshot_preview1:random_get`, which requires initializing the
`wasi_snapshot_preview1` adapter when targeting `wasm32-wasip2` and later, and
that's expensive enough that we'd prefer to avoid it for apps which otherwise
make no use of the adapter.

Signed-off-by: Joel Dice <[email protected]>
@alexcrichton alexcrichton enabled auto-merge July 16, 2025 18:04
@alexcrichton alexcrichton added this pull request to the merge queue Jul 16, 2025
Merged via the queue into bytecodealliance:main with commit 73bcd58 Jul 16, 2025
18 of 19 checks passed
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

Successfully merging this pull request may close these issues.

2 participants