4 ms·
PyPy is about four times faster than CPython (https://speed.pypy.org/ https://speed.pypy.org/) which is not that much compared to the effort. Node.js is about 1
by Rochus 6y ago
PyPy is about four times faster than CPython (https://speed.pypy.org/ https://speed.pypy.org/) which is not that much compared to the effort. Node.js is about 13 times faster (https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fastest.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...).
- the_mitsuhiko 6y agoAnd PyPy breaks some Python code (eg: most C extensions are very slow) in the process. PyPy is a different dialect of Python.
- Rochus 6y agoCPython could implement an alternative, more efficient FFI (such as e.g. the one by LuaJIT) which would not slow down PyPy. So people could gradually migrate.
- overgard 6y agoSlow != Breaks. I've run plenty of production python code in pypy. I'm sure it's not appropriate everywhere, but I wouldn't go so far as to call it a separate dialect.
- nomel 6y agoFor a funny perspective, there’s a python interpreter, written in JS, that is toe to toe with cPython, and faster in many benchmarks: https://brython.info/speed_results.html https://brython.info/speed_results.html
- kzrdude 6y agoSuper cool - but how sad that it's only in the browser, not a complete Python implementation. The page forgets to mention if lower or higher is better.
- overgard 6y ago4 times is a huge boost, and that's on average. For certain operations it's much much faster. Also comparing a volunteer project to an interpreter that has the resources of google behind it is IMO pretty unfair. Also saying the effort of PyPy is purely around speed is misleading. After all, another huge goal of the project was to implement a python interpreter in python, which they succeeded at.
- Rochus 6y ago> 4 times is a huge boost, and that's on average. It's in geometric mean, not average (see http://ece.uprm.edu/~nayda/Courses/Icom5047F06/Papers/paper4.pdf http://ece.uprm.edu/~nayda/Courses/Icom5047F06/Papers/paper4...). The same principle is applied to all testees. It's normal that certain benchmarks run faster than others. That's why we compare geometric means. > Also comparing a volunteer project to an interpreter that has the resources of google behind it is IMO pretty unfair. Didn't the project run for nearly twenty years with seveal rounds of EU funding? I think it's rather the approach than the team size or corporate support. See e.g. LuaJIT which was implemented by a single person in a shorter time frame and achieves similar performance like Node.js. > Also saying the effort of PyPy is purely around speed is misleading Didn's say that. But unfortunately also the other RPython based implementations also don't seem to be faster.
- Rochus 6y agoSo here some references in case you don't believe that there was EU funding: https://doc.pypy.org/en/release-1.9/index-report.html https://doc.pypy.org/en/release-1.9/index-report.html https://ieeexplore.ieee.org/document/1667583 https://ieeexplore.ieee.org/document/1667583 https://mail.python.org/pipermail/pypy-dev/2004-December/001677.html https://mail.python.org/pipermail/pypy-dev/2004-December/001... https://en.wikipedia.org/wiki/PyPy#Funding https://en.wikipedia.org/wiki/PyPy#Funding
- sk2020 6y agoBeing 13x faster is not a compelling enough reason to use Node, in my opinion.