Skip to content

Performance regression in accessing Wasm memory from host #11236

@adambratschikaye

Description

@adambratschikaye

When benchmarking our upgrade to wasmtime 34 we found a regression when it comes to accessing wasm memory in the host. Here's a repo with a some benchmarks with a Wasm module that calls a host function in a loop: https://github.com/adambratschikaye/wasmtime-memory-regression

When the host function accesses the Wasm memory there's a ~30% slowdown when switching from wasmtime 33.0.1 to 34.0.1 (just run cargo bench with both versions to see the difference). When the host function doesn't do anything the performance is unchanged.

Going through a git bisect on the wasmtime repo, it seemed that the regression was coming from #10877.

Versions and Environment

Operating system: Ubuntu 24.04

Architecture: x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancewasmtime:apiRelated to the API of the `wasmtime` crate itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions