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: reuses slice on basicBlock.loopNestingForestChildren #2232

Merged
merged 1 commit into from
Jun 5, 2024
Merged

Conversation

mathetake
Copy link
Member

loopNestingForestChildren is non-empty only when the basic block
is a loop header, and hence previously the slice hasn't been reused much.

This resolves it, and as a result, the compilation uses slightly less memory.

goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero
               │  old.txt   │           new.txt           │
               │   sec/op   │   sec/op    vs base         │
Compilation-10   2.423 ± 0%   2.436 ± 2%  ~ (p=0.097 n=7)

               │   old.txt    │              new.txt               │
               │     B/op     │     B/op      vs base              │
Compilation-10   340.3Mi ± 0%   339.9Mi ± 0%  -0.10% (p=0.001 n=7)

               │   old.txt   │              new.txt              │
               │  allocs/op  │  allocs/op   vs base              │
Compilation-10   605.5k ± 0%   603.9k ± 0%  -0.27% (p=0.001 n=7)

#2182

goos: darwin
goarch: arm64
pkg: github.com/tetratelabs/wazero
               │  old.txt   │           new.txt           │
               │   sec/op   │   sec/op    vs base         │
Compilation-10   2.423 ± 0%   2.436 ± 2%  ~ (p=0.097 n=7)

               │   old.txt    │              new.txt               │
               │     B/op     │     B/op      vs base              │
Compilation-10   340.3Mi ± 0%   339.9Mi ± 0%  -0.10% (p=0.001 n=7)

               │   old.txt   │              new.txt              │
               │  allocs/op  │  allocs/op   vs base              │
Compilation-10   605.5k ± 0%   603.9k ± 0%  -0.27% (p=0.001 n=7)

Signed-off-by: Takeshi Yoneda <[email protected]>
@mathetake mathetake merged commit 506c922 into main Jun 5, 2024
62 of 64 checks passed
@mathetake mathetake deleted the loopssa branch June 5, 2024 21:33
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