Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ssa: optimizes slice allocations (#2242)
This makes the compilation faster and use less memory: ``` goos: darwin goarch: arm64 pkg: github.com/tetratelabs/wazero │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ Compilation/wazero-10 2.184 ± 0% 2.110 ± 0% -3.40% (p=0.001 n=7) Compilation/zig-10 4.331 ± 1% 4.187 ± 1% -3.31% (p=0.001 n=7) geomean 3.075 2.972 -3.36% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ Compilation/wazero-10 337.3Mi ± 0% 301.9Mi ± 0% -10.49% (p=0.001 n=7) Compilation/zig-10 599.3Mi ± 0% 594.3Mi ± 0% -0.84% (p=0.001 n=7) geomean 449.6Mi 423.6Mi -5.79% │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ Compilation/wazero-10 592.9k ± 0% 527.9k ± 0% -10.97% (p=0.001 n=7) Compilation/zig-10 287.8k ± 0% 278.6k ± 0% -3.20% (p=0.001 n=7) geomean 413.1k 383.5k -7.17% ``` Signed-off-by: Takeshi Yoneda <[email protected]>
- Loading branch information