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

Store one fiber stack in a Store<T> #9604

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

alexcrichton
Copy link
Member

This commit stores a single fiber stack in Store<T> as a cache to be used throughout the lifetime of the Store. This should help amortize the cost of allocating a stack for use in a store because the same stack can be used continuously throughout the lifetime of the Store<T>. This notably reduces contention on the lock used to manage the pooling allocator when possible.

This commit stores a single fiber stack in `Store<T>` as a cache to be
used throughout the lifetime of the `Store`. This should help amortize
the cost of allocating a stack for use in a store because the same stack
can be used continuously throughout the lifetime of the `Store<T>`. This
notably reduces contention on the lock used to manage the pooling
allocator when possible.
@alexcrichton alexcrichton requested a review from a team as a code owner November 14, 2024 05:29
@alexcrichton alexcrichton requested review from pchickey and removed request for a team November 14, 2024 05:29
@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Nov 14, 2024
Copy link
Contributor

@pchickey pchickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@alexcrichton alexcrichton added this pull request to the merge queue Nov 14, 2024
Merged via the queue into bytecodealliance:main with commit 7bd09e6 Nov 14, 2024
36 checks passed
@alexcrichton alexcrichton deleted the cache-one-stack branch November 14, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants