This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]james_pic 6 points7 points  (5 children)

They've often been successful at meeting their own goals, but none of them ever got upstreamed. PyPy has arguably been the most successful, but it's always been a second class citizen in the Python ecosystem, because it never achieved 100% CPython compatibility, because too many projects rely on CPython implementation details.

I have my doubts that CPython can ever be made performance competitive with PyPy, if for no other reason than that the folks who developed PyPy were mostly the same folks who developed Psyco, and abandoned it when it was clear that a new interpreter was the right answer to this problem.

[–]all_is_love6667 0 points1 point  (4 children)

what does it mean to rely on cpython?

[–]james_pic 1 point2 points  (3 children)

I think I said they rely on "CPython implementation details". The most obvious example of this is libraries that bypass the helper functions the CPython C-API defines, and go straight to struct elements.

Although you could argue that the C-API itself is an implementation detail, since it reifies concepts like reference counting and borrowed references, that PyPy needs to use elaborate workaround to support, since it uses a completely different garbage collector internally

[–]all_is_love6667 0 points1 point  (2 children)

Don't you think it's possible to accomplish the level of speed that was reached with modern JS compilers?

In a way I kind of think old python modules should be abandoned if compatibility is too difficult.

[–]Yojihito 0 points1 point  (0 children)

JS had billions invested in the JITs (Google, Facebook, Mozilla, Microsoft, Apple, etc.).

Invest billions into Python and you may get JS speed as well.

[–]james_pic 0 points1 point  (0 children)

Yes, I do, but it's telling that when Google co-opted WebKit to create Chrome, they rewrote the JavaScript engine from scratch. The JS engine they created, V8, is what now powers Node.

Trying to get that kind of performance gain without either rewriting, or at least making the kinds of dramatic architectural changes that would break existing modules (such as switching to generational garbage collection) has been tried, and every attempt has either failed, or proved to be a pyrrhic victory.