-
Notifications
You must be signed in to change notification settings - Fork 11
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
Performance #85
Comments
Hi, thanks for the benchmarking! Curious if you found anything interesting about this or if it aligns with your expectation? |
Hi @nilslice - I was hoping for say 20% - 50% decrease I performance in comparison to native. But I do not know the underlying wazero performance and what to expect. I'm going to try to write a super simple test case using wazero from scratch to see if it is possible to get better performance. As I understand it, wazero, compiles (AOT) to machine code and hence should in theory have quite good performance. Maybe marshal data between the host and the runtime is quite expensive. Cheers, |
Yea I would expect to see a little better performance here too - and I think it could partially be a symptom of only really comparing JSON serialization vs other code execution. In any case, tagging @evacchi for awareness. |
I don't think in general you get that kind of perf on any Wasm runtime, but specifically, you may want to tune TinyGo. Consider that the LLVM output for native is kind of different than the one for Wasm; take a look here https://tinygo.org/docs/guides/optimizing-binaries/ |
Thanks @evacchi I'll have a look and do some more experiments. Cheers, |
Hi, I'm new to extism but find your project very attractive! Thanks!
I wonder what to expect in terms of performance, and is there a way to improve that?
I'm using tinygo to compile the was file using
tinygo build -o <outfile> -target wasi <gofile>
I've done two benchmarks:
Noop function:
Host benchmark:
Output:
plug-in:
Host benchmark:
Output (Native is just go std json.Unmarshal/Marshal for comparison):
The text was updated successfully, but these errors were encountered: