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

interpreter: removes unneeded stack walks #2274

Merged
merged 1 commit into from
Jun 27, 2024
Merged

interpreter: removes unneeded stack walks #2274

merged 1 commit into from
Jun 27, 2024

Conversation

mathetake
Copy link
Member

@mathetake mathetake commented Jun 27, 2024

This makes the interpreter's compilation faster by removing the
unnecessary stack walks. As a result, for some binary, we observe
93% drops in the compilation performance(!) with an additional
but negligible memory usage.

goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero
                      │   old.txt    │              new.txt               │
                      │    sec/op    │   sec/op     vs base               │
Compilation/wazero-10    130.1m ± 1%   124.7m ± 1%   -4.12% (p=0.002 n=6)
Compilation/zig-10      9097.2m ± 0%   549.0m ± 1%  -93.96% (p=0.002 n=6)
Compilation/zz-10         1.159 ± 5%    1.145 ± 3%   -1.20% (p=0.041 n=6)
TinyGo/Compile/container_heap.test-10     16.54m ± 1%   15.60m ± 4%  -5.66% (p=0.002 n=6)
TinyGo/Compile/container_list.test-10     16.36m ± 1%   15.42m ± 1%  -5.74% (p=0.002 n=6)
TinyGo/Compile/container_ring.test-10     16.08m ± 1%   15.17m ± 0%  -5.64% (p=0.002 n=6)
TinyGo/Compile/crypto_des.test-10         16.79m ± 1%   15.84m ± 0%  -5.68% (p=0.002 n=6)
TinyGo/Compile/crypto_md5.test-10         16.61m ± 1%   15.63m ± 0%  -5.88% (p=0.002 n=6)
TinyGo/Compile/crypto_rc4.test-10         15.93m ± 0%   15.05m ± 1%  -5.54% (p=0.002 n=6)
TinyGo/Compile/crypto_sha1.test-10        16.63m ± 0%   15.69m ± 0%  -5.66% (p=0.002 n=6)
TinyGo/Compile/crypto_sha256.test-10      17.15m ± 1%   16.13m ± 1%  -6.00% (p=0.002 n=6)
TinyGo/Compile/crypto_sha512.test-10      17.43m ± 2%   16.30m ± 1%  -6.49% (p=0.002 n=6)
TinyGo/Compile/encoding_ascii85.test-10   16.57m ± 1%   15.66m ± 1%  -5.52% (p=0.002 n=6)

@mathetake mathetake merged commit f937311 into main Jun 27, 2024
57 checks passed
@mathetake mathetake deleted the interpretermaybe branch June 27, 2024 16:43
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.

1 participant