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

py2wasm performance is the same as CPython 3.14 #8

Open
mkokryashkin opened this issue Aug 29, 2024 · 0 comments
Open

py2wasm performance is the same as CPython 3.14 #8

mkokryashkin opened this issue Aug 29, 2024 · 0 comments

Comments

@mkokryashkin
Copy link

So I've been experimenting with WAMR (wasm-micro-runtime) for a while now, and it has a great feature -- an AOT-compiler for WASM binaries. This compiler tends to speed up the execution of wasm modules orders of magnitude for some scenarions, while still offering all the benefits of WASM/WASI.

With that said, here are the pystone benchmark results for native Python, AOT wasm32-wasi CPython, and AOT py2wasm:

Native Python

Pystone(1.1) time for 50000 passes = 0.131406
This machine benchmarks at 380500 pystones/second

AOT wasm32-wasi CPython

Pystone(1.1) time for 50000 passes = 0.201963
This machine benchmarks at 247570 pystones/second

AOT py2wasm

Pystone(1.1) time for 50000 passes = 0.215168
This machine benchmarks at 232377 pystones/second

It is clearly visible that conventional CPython is faster than py2wasm, although only by a fraction. Moreover, it is consistently better over several runs.

This raises a question of whether py2wasm is a viable option, or the community is better of focusing on performance of the official CPython wasm32-wasi target, rather than on the development of py2wasm.

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

No branches or pull requests

1 participant