4 ms·
Could you compile Python to Web Webassembly instead of JavaScript? Presumably that would have better performance.
by joshlk 6y ago
Could you compile Python to Web Webassembly instead of JavaScript? Presumably that would have better performance.
- pansa2 6y agoStatically compiling dynamically-typed Python to statically-typed WebAssembly would be similar to how Nuitka [0] compiles Python to C. This compiled code may be a little faster than interpreted Python, but it's still going to be quite slow - much slower in a browser than JIT-compiled JavaScript. AFAIK the ideal way to maximize the performance of Python in the browser would be to JIT-compile Python code to WebAssembly. Does anyone know whether WebAssembly implementations are able to support that? [0] http://nuitka.net/ http://nuitka.net/