News for hackers. Stuff that matters.
Re:Attempts to make Python fast by Rochus on Wednesday October 21, 2020 @12:56PM (#24849686)
PyPy is about four times faster than CPython (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/...).
Re:Attempts to make Python fast by nomel on Wednesday October 21, 2020 @01:28PM (#24850053)
For 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
Re:Attempts to make Python fast by kzrdude on Wednesday October 28, 2020 @07:24PM (#24925320)
Super 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.
Re:Attempts to make Python fast by overgard on Wednesday October 21, 2020 @01:35PM (#24850139)
4 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.

Re:Attempts to make Python fast by Rochus on Wednesday October 21, 2020 @01:51PM (#24850286)
> 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...). 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.

Re:Attempts to make Python fast by Rochus on Thursday October 22, 2020 @07:37AM (#24856950)
Re:Attempts to make Python fast by the_mitsuhiko on Wednesday October 21, 2020 @01:16PM (#24849915)
And PyPy breaks some Python code (eg: most C extensions are very slow) in the process. PyPy is a different dialect of Python.
Re:Attempts to make Python fast by overgard on Wednesday October 21, 2020 @01:30PM (#24850086)
Slow != 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.
Re:Attempts to make Python fast by Rochus on Wednesday October 21, 2020 @01:19PM (#24849950)
CPython 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.
Re:Attempts to make Python fast by sk2020 on Wednesday October 21, 2020 @03:54PM (#24851386)
Being 13x faster is not a compelling enough reason to use Node, in my opinion.