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

ssa: removes map use for Value aliasing #2285

Merged
merged 2 commits into from
Jul 9, 2024
Merged

ssa: removes map use for Value aliasing #2285

merged 2 commits into from
Jul 9, 2024

Conversation

mathetake
Copy link
Member

@mathetake mathetake commented Jul 9, 2024

This improves the compilation perf by up to ~30% without
runtime perf impacts.

goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero/internal/integration_test/stdlibs
                                            │   old.txt    │              new.txt               │
                                            │    sec/op    │   sec/op     vs base               │
Zig/Compile/test-opt.wasm-10                    2.683 ± 1%    2.591 ± 1%   -3.44% (p=0.002 n=6)
Zig/Run/test-opt.wasm-10                        18.75 ± 0%    19.03 ± 1%   +1.48% (p=0.004 n=6)
Zig/Compile/test.wasm-10                        3.529 ± 0%    3.516 ± 1%        ~ (p=0.180 n=6)
Zig/Run/test.wasm-10                            19.55 ± 2%    19.48 ± 1%        ~ (p=0.310 n=6)
TinyGo/Compile/container_heap.test-10          298.1m ± 1%   210.1m ± 0%  -29.51% (p=0.002 n=6)
TinyGo/Run/container_heap.test-10              14.59m ± 2%   14.55m ± 1%        ~ (p=0.310 n=6)
TinyGo/Compile/container_list.test-10          290.6m ± 0%   208.6m ± 0%  -28.20% (p=0.002 n=6)
TinyGo/Run/container_list.test-10              14.47m ± 1%   14.40m ± 0%        ~ (p=0.132 n=6)
TinyGo/Compile/container_ring.test-10          286.4m ± 0%   205.1m ± 0%  -28.42% (p=0.002 n=6)
TinyGo/Run/container_ring.test-10              14.36m ± 1%   14.42m ± 1%        ~ (p=0.180 n=6)
TinyGo/Compile/crypto_des.test-10              296.6m ± 0%   214.2m ± 2%  -27.77% (p=0.002 n=6)
TinyGo/Run/crypto_des.test-10                  18.70m ± 4%   18.64m ± 0%        ~ (p=0.132 n=6)
TinyGo/Compile/crypto_md5.test-10              295.8m ± 5%   211.4m ± 0%  -28.53% (p=0.002 n=6)
TinyGo/Run/crypto_md5.test-10                  21.72m ± 1%   20.67m ± 1%   -4.85% (p=0.002 n=6)
TinyGo/Compile/crypto_rc4.test-10              291.4m ± 2%   203.4m ± 0%  -30.20% (p=0.002 n=6)
TinyGo/Run/crypto_rc4.test-10                  161.0m ± 1%   160.7m ± 1%        ~ (p=0.818 n=6)
TinyGo/Compile/crypto_sha1.test-10             296.0m ± 0%   211.9m ± 1%  -28.43% (p=0.002 n=6)
TinyGo/Run/crypto_sha1.test-10                 16.14m ± 1%   16.17m ± 1%        ~ (p=0.485 n=6)
TinyGo/Compile/crypto_sha256.test-10           301.0m ± 1%   216.1m ± 1%  -28.21% (p=0.002 n=6)
TinyGo/Run/crypto_sha256.test-10               16.21m ± 1%   16.27m ± 1%        ~ (p=0.310 n=6)
Wasip1/Compile/src_archive_tar.test-10          1.596 ± 0%    1.490 ± 0%   -6.63% (p=0.002 n=6)
Wasip1/Run/src_archive_tar.test-10             396.5m ± 0%   396.5m ± 1%        ~ (p=0.818 n=6)
Wasip1/Compile/src_bufio.test-10                1.089 ± 0%    1.008 ± 0%   -7.44% (p=0.002 n=6)
Wasip1/Run/src_bufio.test-10                   121.4m ± 0%   121.5m ± 0%        ~ (p=0.240 n=6)
Wasip1/Compile/src_bytes.test-10                1.127 ± 0%    1.038 ± 0%   -7.91% (p=0.002 n=6)
Wasip1/Run/src_bytes.test-10                   468.1m ± 1%   466.8m ± 1%        ~ (p=0.132 n=6)
Wasip1/Compile/src_context.test-10              1.213 ± 1%    1.119 ± 0%   -7.76% (p=0.002 n=6)
Wasip1/Run/src_context.test-10                 33.69m ± 1%   33.57m ± 0%   -0.33% (p=0.026 n=6)
Wasip1/Compile/src_encoding_ascii85.test-10    979.9m ± 0%   905.5m ± 0%   -7.59% (p=0.002 n=6)
Wasip1/Run/src_encoding_ascii85.test-10        7.320m ± 1%   7.324m ± 3%        ~ (p=0.589 n=6)
Wasip1/Compile/src_encoding_asn1.test-10        1.128 ± 1%    1.043 ± 0%   -7.48% (p=0.002 n=6)
Wasip1/Run/src_encoding_asn1.test-10           8.221m ± 2%   8.239m ± 1%        ~ (p=0.394 n=6)
Wasip1/Compile/src_encoding_base32.test-10    1019.3m ± 1%   940.4m ± 0%   -7.74% (p=0.002 n=6)
Wasip1/Run/src_encoding_base32.test-10         28.57m ± 1%   28.78m ± 0%   +0.74% (p=0.041 n=6)
Wasip1/Compile/src_encoding_base64.test-10    1024.8m ± 1%   945.4m ± 0%   -7.75% (p=0.002 n=6)
Wasip1/Run/src_encoding_base64.test-10         11.78m ± 1%   11.80m ± 4%        ~ (p=0.589 n=6)

#2182

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@mathetake mathetake merged commit 95f37cd into main Jul 9, 2024
12 checks passed
@mathetake mathetake deleted the aliasremovesmap branch July 9, 2024 23:54
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