Live data from Hacker News

PyPy.js: Now faster than CPython

rfk.id.au

41–50 of 80 posts

Re: PyPy.js: Now faster than CPython

#41
post #38
post #23

Earlier quoted context omitted.

I still don't get the point of using Go instead of PyPy or Cython.

The point was that once people are looking at restructuring the code base and re-writing parts of it, it also becomes a point of evaluation other technologies and frameworks. So there is a high chance many will not switch Python 2 -> Python 3 but Python 2 -> Go or something else. Then well ok, the answer to "What did Python 3 bring to the Python community?" becomes "Yeah it ended up driving a lot of people away", whi…

So switching Python 2 -> Python 3 is a higher cost than Python 2 -> Go?!?

Re: PyPy.js: Now faster than CPython

#42
post #2

I felt it was a grave mistake for Python to direct the community effort into backwards incomparable Python 3, rather than on focusing on the speed (and better profiling instrumentation) of Python 2 (perhaps adding a standard JIT compiler). As a result, had our company started now, we would have written our Twisted server in C or Go instead of Python like we did.

Meanwhile, refactored PHP makes Wordpress 20% faster. http://news.php.net/php.internals/73888 , https://wiki.php.net/phpng and https://news.ycombinator.com/item?id=7699322

HHVM and now PHP 5.7-dev, both with JIT - the future of PHP looks bright.

Starting a new project, we would choose PHP, Node.js or Go according to the requirements.

Re: PyPy.js: Now faster than CPython

#43
post #41
post #38

Earlier quoted context omitted.

The point was that once people are looking at restructuring the code base and re-writing parts of it, it also becomes a point of evaluation other technologies and frameworks. So there is a high chance many will not switch Python 2 -> Python 3 but Python 2 -> Go or something else. Then well ok, the answer to "What did Python 3 bring to the Python community?" becomes "Yeah it ended up driving a lot of people away", whi…

So switching Python 2 -> Python 3 is a higher cost than Python 2 -> Go?!?

Yes if you add in amortized benefit of extra performance and static type checking during compilation.

benefit(2->3 + performance benefit + maintainability) benefit(2->Go + performance benefit + maintainability)

The time cost of 2->3 will be less but if I know I will get better memory footprint, and faster response times I might be willing to invest some more time into it.

Or another way to look at it, once one sits down and rolls their sleeves looking to re-factor/renew/refresh the code base there is a good chance they will look around them and see what else is out there.

Re: PyPy.js: Now faster than CPython

#44
post #42
post #2

I felt it was a grave mistake for Python to direct the community effort into backwards incomparable Python 3, rather than on focusing on the speed (and better profiling instrumentation) of Python 2 (perhaps adding a standard JIT compiler). As a result, had our company started now, we would have written our Twisted server in C or Go instead of Python like we did.

Meanwhile, refactored PHP makes Wordpress 20% faster. http://news.php.net/php.internals/73888 , https://wiki.php.net/phpng and https://news.ycombinator.com/item?id=7699322 HHVM and now PHP 5.7-dev, both with JIT - the future of PHP looks bright. Starting a new project, we would choose PHP, Node.js or Go according to the requirements.

[deleted]

Re: PyPy.js: Now faster than CPython

#45
post #44
post #42

Earlier quoted context omitted.

Meanwhile, refactored PHP makes Wordpress 20% faster. http://news.php.net/php.internals/73888 , https://wiki.php.net/phpng and https://news.ycombinator.com/item?id=7699322 HHVM and now PHP 5.7-dev, both with JIT - the future of PHP looks bright. Starting a new project, we would choose PHP, Node.js or Go according to the requirements.

[deleted]

Please read the page again (search for "JIT") and follow the link for more info.

Re: PyPy.js: Now faster than CPython

#46
post #28

Earlier quoted context omitted.

JITs are great but can be unpredictable, that's probably the cause. As mentioned in the article, JITs vs AOT have upsides and downsides.

Doesn't Chrome specifically _not_ optimize asm.js, as well? Wonder if that has anything to do with it.

It doesn't special case the asm.js JS subset same way as Firefox does, but V8 guys are paying attention to optimizing asm.js-style code.

Re: PyPy.js: Now faster than CPython

#48
post #33

Earlier quoted context omitted.

You can get that with PyPy and Cython.

Clean and efficient concurrency primitives? I think not? I would be very interested if that is indeed the case.

Stackless Python has very clean and efficient concurency primitives, something lot of people dont seem to know..

Re: PyPy.js: Now faster than CPython

#49
In the browser environment, people usually use quite a few inline anonymous functions. Javascript is great at this since you can define full-blown anonymous functions anywhere.

Python, on the other hand, is definitely one of the worst at this. You can only create one-line, single-expression anonymous function with its lambda keyword. Of all the languages you want to convert to JS so that it runs on the browser, Python is probably the last.

Re: PyPy.js: Now faster than CPython

#50
post #33

Earlier quoted context omitted.

You can get that with PyPy and Cython.

Clean and efficient concurrency primitives? I think not? I would be very interested if that is indeed the case.

PyPy supports greenlets and a Stackless Python-style CSP with tasklets and channels. See http://doc.pypy.org/en/latest/stackless.html . And it has for years. The original Stackless author is also one of the PyPy developers.

Or do you mean some other style of concurrency primitives?

Post reply on HN