4 ms·
Is there a performance hit compared to "native" Python?
by amelius 8y ago
Is there a performance hit compared to "native" Python?
- drchickensalad 8y agoWithout a doubt.
- lkbm 8y agoThere's a chart and some discussion here: http://droettboom.com/blog/2018/04/04/python-in-the-browser/ http://droettboom.com/blog/2018/04/04/python-in-the-browser/ (and some followup at http://droettboom.com/blog/2018/04/11/profiling-webassembly/ http://droettboom.com/blog/2018/04/11/profiling-webassembly/ ) TL;DR: pyodide in Firefox was slower than cpython.
- amelius 8y agoThanks. Note that the author of that post said: > UPDATE 2018-04-11: My hunch was wrong, and I was able to get to the bottom of the root cause and significantly speed up these benchmarks. And there's an updated graph here: http://droettboom.com/blog/2018/04/11/profiling-webassembly/ http://droettboom.com/blog/2018/04/11/profiling-webassembly/
- goatlover 8y agoCertainly for anything using Numpy.
- mdboom 8y agoActually, Numpy-using-code is closer to native speeds than pure Python is. The thing that seems to cause a greater gap between wasm and native speeds is lots of Python-level function calls, not the tight C loops that make up much of Numpy.