3 ms·
> Python in the browser is a no-go performance-wise, of course. "Running the Python interpreter inside a JavaScript virtual machine adds a performance penalty,
by CharlesW 7y ago
> Python in the browser is a no-go performance-wise, of course.
"Running the Python interpreter inside a JavaScript virtual machine adds a performance penalty, but that penalty turns out to be surprisingly small — in our benchmarks, around 1x-12x slower than native on Firefox and 1x-16x slower on Chrome. Experience shows that this is very usable for interactive exploration."[1][2]
[1] https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scientific-python-stack-to-the-browser/ https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scien... [2] https://alpha.iodide.io/notebooks/300/ https://alpha.iodide.io/notebooks/300/
- p_l 7y agoSo, an already slow language made slower? No thanks.
- mr_toad 7y agoThe problem is not so much the run-time performance of the code, it's the overhead of loading the Python run-time environment over the network the first time you open the page.
- brachi 7y agoThe main point though, is that running Python in the browser it's an unnecessary abstraction because you get a crappier version of something that runs pretty well natively. If you're starting from scratch, I think that the browser might be close to native performance in some tasks. Porting existing applications is a pain when you start looking into the details.