Closed nilslice closed 5 months ago
we released v1.7.2 a few days ago with a bunch of fixes https://github.com/tetratelabs/wazero/releases/tag/v1.7.2
main
includes some improvements to the compilation times as well.
This release may also see some improvements https://github.com/tetratelabs/wazero/releases/tag/v1.7.3
Will test it out
Looks like we're using a now-removed API (1.7.0 -> 1.7.3):
go test -bench ./...
# github.com/extism/go-sdk [github.com/extism/go-sdk.test]
./extism_test.go:773:62: undefined: experimental.FunctionListenerFactoryKey
./extism_test.go:793:61: undefined: experimental.FunctionListenerFactoryKey
1.3.0
:
BenchmarkInitialize/noop-14 722 1637676 ns/op 2863588 B/op 2534 allocs/op
BenchmarkInitializeWithCache/noop-14 3314 338563 ns/op 1627090 B/op 1481 allocs/op
BenchmarkNoop/noop-14 631005 1938 ns/op 26504 B/op 22 allocs/op
BenchmarkReplace/empty-14 583592 2049 ns/op 26504 B/op 22 allocs/op
BenchmarkReplace/2048-14 28004 43246 ns/op 47.36 MB/s 28552 B/op 23 allocs/op
BenchmarkReplace/4096-14 14134 83635 ns/op 48.97 MB/s 30600 B/op 23 allocs/op
BenchmarkReplace/8192-14 7153 166118 ns/op 49.31 MB/s 34696 B/op 23 allocs/op
BenchmarkReplace/16383-14 3462 341831 ns/op 47.93 MB/s 42888 B/op 23 allocs/op
BenchmarkReplace/32768-14 1543 773949 ns/op 42.34 MB/s 59273 B/op 23 allocs/op
1.7.0
:
BenchmarkInitialize/noop-14 124 9525460 ns/op 6155813 B/op 8558 allocs/op
BenchmarkInitializeWithCache/noop-14 2179 487101 ns/op 1871706 B/op 1945 allocs/op
BenchmarkNoop/noop-14 223034 5150 ns/op 70144 B/op 23 allocs/op
BenchmarkReplace/8192-14 8060 137262 ns/op 59.68 MB/s 78343 B/op 24 allocs/op
BenchmarkReplace/16383-14 4262 275337 ns/op 59.51 MB/s 86539 B/op 24 allocs/op
BenchmarkReplace/32768-14 2041 587690 ns/op 55.76 MB/s 102929 B/op 24 allocs/op
BenchmarkReplace/empty-14 182199 5555 ns/op 70140 B/op 23 allocs/op
BenchmarkReplace/2048-14 29769 40297 ns/op 50.82 MB/s 72198 B/op 24 allocs/op
BenchmarkReplace/4096-14 16035 72510 ns/op 56.49 MB/s 74245 B/op 24 allocs/op
1.7.3
:
BenchmarkInitialize/noop-14 158 7486412 ns/op 5319317 B/op 6911 allocs/op
BenchmarkInitializeWithCache/noop-14 2560 473021 ns/op 1851399 B/op 1806 allocs/op
BenchmarkNoop/noop-14 141536 7226 ns/op 70139 B/op 23 allocs/op
BenchmarkReplace/16383-14 4167 283178 ns/op 57.86 MB/s 86535 B/op 24 allocs/op
BenchmarkReplace/32768-14 1978 604613 ns/op 54.20 MB/s 102923 B/op 24 allocs/op
BenchmarkReplace/empty-14 161700 6700 ns/op 70134 B/op 23 allocs/op
BenchmarkReplace/2048-14 28716 41730 ns/op 49.08 MB/s 72199 B/op 24 allocs/op
BenchmarkReplace/4096-14 16026 74786 ns/op 54.77 MB/s 74245 B/op 24 allocs/op
BenchmarkReplace/8192-14 7995 144315 ns/op 56.76 MB/s 78339 B/op 24 allocs/op
There do seem to be some improvements despite there being some regressions, I think I'm in favor of updating to 1.7.3 since it probably includes some other bugfixes and improvements compared to 1.3.0
I think I'm in favor of updating to 1.7.3
I am too! I think we just need to consider what the alternative is for the experimental Listener things are which were removed. We have tests to ensure we can still call these APIs, and I think we use them in the Observe Go SDK, so there's some additional work to figure out where they went and/or how to fix/update the code.
It looks like we can just switch over to experimental.WithFunctionListenerFactory - I will try to update the test
@zshipko i can't approve, given it's my PR - but if CI passes, feel free to merge! we can do some additional testing before we release.
Opening this up as a draft for now for discussion.
This PR brings
wazero
up to the latest version, which introduces their new optimizing compiler. I've added benchmarks from the current version we usev1.3.0
, and the latestv1.7.0
:v1.3.0
:v1.7.0
: