bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
15.43k stars 1.31k forks source link

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

Closed alexcrichton closed 1 week ago

alexcrichton commented 1 week ago

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.