4 ms·
Site says this is based on Pyodide which is CPython compiled to WASM (similarly is Coldbrew). Brython (similarly is Skulpt but which lacks DOM manipulation) is
by forgotpwd16 4y ago
Site says this is based on Pyodide which is CPython compiled to WASM (similarly is Coldbrew). Brython (similarly is Skulpt but which lacks DOM manipulation) is a new implementation with parser & built-in objects written in JS and standard library is Python's converted to JS. There's also Transcrypt that opts for integration with JS libraries instead. I expect PyScript to be more compatible (which includes libraries written not in Python, such as numpy, pandas, etc), Brython be more flexible (but cannot support anything not in Python), and Transcrypt should've the best performance (when one wants something be used like JS).
- codedokode 4y agoTranspiling to JS is actually a good idea because one could benefit from JIT (as long as your variable types are not too dynamic). UPD: I looked at the compiled code and currently it is unlikely to be optimized. Also this page [1] shows that the code run in browser can be up to 1000 times slower than in a native Python interpreter. [1] https://brython.info/speed_results.html https://brython.info/speed_results.html
- kervarker 4y agoThe figures in this page are relative to base 100 for CPython. Sometimes Brython is faster (value < 100), sometimes slower (value > 100). The worst value is 12 times slower.