Live data from Hacker News

PyPy.js: Now faster than CPython

rfk.id.au

31–40 of 80 posts

Re: PyPy.js: Now faster than CPython

#31
post #8

Earlier quoted context omitted.

Lots of people use Python for tasks that are not CPU-bound. Scalable web-whatever and scientific computing aren't the whole world.

Even scalable web-whatever is often IO-bound... of my several apps in production, there's only one where CPU is a serious concern, and I run that one on PyPy. cPython is fine for the others.

I'll go so far as to say that we haven't done enough with making things fast on multicore processors except with IO-bound tasks. The current architecture of multicore processors stinks for achieving anything but the "embarrassingly parallel."

Re: PyPy.js: Now faster than CPython

#32
post #23

Earlier quoted context omitted.

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

Cython is really impressive, but it produces incredibly huge C files, which then compile into enormous binaries. So it's not terribly suitable when code size matters.

Sure because Go binaries produced by Go static linking are small...

https://code.google.com/p/go/issues/detail?id=6853

Re: PyPy.js: Now faster than CPython

#33
post #23

Earlier quoted context omitted.

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

Clean and efficient concurrency primitives, greater memory efficiency, and the ability to finely control memory layout, combined with just enough "high level" in the language to write complex systems. For that, you give up some (but not too much) of the rapidity of dynamic typing, and you don't have the marvelous ecosystem of libraries Python has built up. (yet)

You can get that with PyPy and Cython.

Re: PyPy.js: Now faster than CPython

#34
post #28
post #7

I get 157K/sec in the terminal and 309K/sec in Chrome. As the article says, Chrome's performance shows wide variation, even after JIT warmup. It's ranging from 50K/sec to 320K/sec. Bizarre.

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.

Re: PyPy.js: Now faster than CPython

#35
post #33

Earlier quoted context omitted.

Clean and efficient concurrency primitives, greater memory efficiency, and the ability to finely control memory layout, combined with just enough "high level" in the language to write complex systems. For that, you give up some (but not too much) of the rapidity of dynamic typing, and you don't have the marvelous ecosystem of libraries Python has built up. (yet)

You can get that with PyPy and Cython.

I like Cython, but how do you do CSP (Communicating Sequential Processes) with it?

Re: PyPy.js: Now faster than CPython

#36
post #33

Earlier quoted context omitted.

Clean and efficient concurrency primitives, greater memory efficiency, and the ability to finely control memory layout, combined with just enough "high level" in the language to write complex systems. For that, you give up some (but not too much) of the rapidity of dynamic typing, and you don't have the marvelous ecosystem of libraries Python has built up. (yet)

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.

Re: PyPy.js: Now faster than CPython

#37
post #23
post #10

Earlier quoted context omitted.

Sadly I agree. Looking back Python 3 came too late, didn't offer much in terms of an incentive to justify switching to it, divided the community and in the process also left other things people worry about by the wayside -- performance, packaging, better concurrency handling (no not via Tulip or Twisted). I think, like you point out, many before they decided to sink the time into upgrading to Python 3 to get better u…

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

Because Go is at least as fast as PyPy or Cython, have a similar coding feeling to Python, have language level concurrency support, and has a clear/consistent development roadmap moving forward.

PyPy is not really a good example here. It is still highly experimental, takes long time to compile, it's not compatible with quite a few libraries in normal Python, and still has all relative downsides of dynamic typing. To be frank, I don't get the point of using PyPy instead of Go.

Previously most Python libraries already use C to optimize critical components. If you can use just one language to get similar performance, why do you bother using two then?

Re: PyPy.js: Now faster than CPython

#38
post #23
post #10

Earlier quoted context omitted.

Sadly I agree. Looking back Python 3 came too late, didn't offer much in terms of an incentive to justify switching to it, divided the community and in the process also left other things people worry about by the wayside -- performance, packaging, better concurrency handling (no not via Tulip or Twisted). I think, like you point out, many before they decided to sink the time into upgrading to Python 3 to get better u…

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", which I am sure wasn't the intended purpose of Python 3.0

Re: PyPy.js: Now faster than CPython

#39

Does this work at all in Safari? Is Safari's crappy performance of native->js ever going to catch up to FF and Chrome?

Apple's webkit development has slowed down, as it seems. Only two blog entries in the last half year: https://www.webkit.org/blog/

What a petty, it seems Google's forking of Webkit (named Blink) has hurt Webkit. Google's behavior of removing "CSS regions" was an unacceptable move.

Post reply on HN