2 ms·
WASM lacks garbage collection and is statically typed. You'd have to write a whole Python interpreter, so I'd expect the end result would be slower than the off
by MaxBarraclough 6y ago
WASM lacks garbage collection and is statically typed. You'd have to write a whole Python interpreter, so I'd expect the end result would be slower than the official Python interpreter.
I imagine it would make more sense to compile Python to JavaScript and leverage the optimising JavaScript JIT engines, but no doubt an efficient transpiler would be a significant undertaking. The Transcrypt project [0] does something like this but I don't think it emphasises performance.
[0] https://www.transcrypt.org/ https://www.transcrypt.org/