Remix.run Logo
bheadmaster 17 hours ago

I can think of two possible reasons:

First is the Google's manpower. Google somehow succeeds in writing fast software. Most Google products I use are fast in contrast to the rest of the ecosystem. It's possible that Google simply did a better job.

The second is CPython legacy. There are faster implementations of Python that completely implement the API (PyPy comes to mind), but there's a huge ecosystem of C extensions written with CPython bindings, which make it virtually impossible to break compatibility. It is possible that this legacy prevents many possible optimizations. On the other hand, V8 only needs to keep compatibility on code-level, which allows them to practically switch out the whole inside in incremental search for a faster version.

I might be wrong, so take what I said with a grain of salt.

canucker2016 15 hours ago | parent [-]

Don't forget that there was a Google attempt at making a faster Python - Unladen Swallow. It got lots of PR but never merged with mainline CPython (wikipedia says a dev branch was released).

see https://en.wikipedia.org/wiki/Unladen_Swallow

pansa2 13 hours ago | parent [-]

Unladen Swallow got a lot of hype but was only a very small project. IIRC the only people working on it were two interns.

V8 was a much higher priority - Google hired many of the world’s best VM engineers to develop it.

pjmlp 3 hours ago | parent [-]

Some of them like Lars Bak, have background up to Self VM, which is a language much more dynamic than Python.

Anything goes regarding changing object shapes, it is one step further than Smalltalk in language plasticity.