Open andrewkroh opened 2 years ago
I hacked (e0cd94de4a4c75cae3a9e40cff3d3adb9eae3b85) together an implementation that uses wazero. The parallel track is not likely correct because it didn't not properly implement thread-safety into the hack.
goos: darwin
goarch: amd64
pkg: github.com/andrewkroh/elastic-ingest-wasm-go/pkg/webassembly
cpu: VirtualApple @ 2.50GHz
BenchmarkProcess
BenchmarkProcess/serial
BenchmarkProcess/serial-10 646933 8976 ns/op
BenchmarkProcess/parallel
BenchmarkProcess/parallel-10 2137299 2867 ns/op
PASS
ok github.com/andrewkroh/elastic-ingest-wasm-go/pkg/webassembly 15.340s
% benchcmp old.txt new.txt benchcmp is deprecated in favor of benchstat: https://pkg.go.dev/golang.org/x/perf/cmd/benchstat benchmark old ns/op new ns/op delta BenchmarkProcess/serial-10 13422 8976 -33.12% BenchmarkProcess/parallel-10 3797 2867 -24.49%
This is an issue to track the result of the benchmark during development. This is not a methodical approach.
From: c96d2ef764d3469f9de0eb456c395b3bcb48447a