markshannon / faster-cpython

How to make CPython faster.
937 stars 19 forks source link

Comparison with PyPy #3

Closed v4dkou closed 3 years ago

v4dkou commented 3 years ago

faster-cpython's plan involves implementing a JIT. This is a good strategy, and it's already proven that combined with other enhancements will yield a ~x5 improvement.

https://www.pypy.org/

On average, PyPy is 4.2 times faster than CPython

"If you want your code to run faster, you should probably just use PyPy." -- Guido van Rossum (creator of Python)

I've found no reference of PyPy which is a project with a similar premise, but already battle-tested.

This begs the question: what would faster-cpython do differently? Shouldn't we just contribute to PyPy?

Bapi-Reddy commented 3 years ago

Also how does the new implementation differ from existing jit implementation like numba.

markshannon commented 3 years ago

This is about how to make CPython faster. Feel free to contribute to PyPy, I'm sure they would appreciate it

astrojuanlu commented 3 years ago

This begs the question: what would faster-cpython do differently?

And also to the other ~25 projects listed in https://github.com/pfalcon/awesome-python-compilers/

timkofu commented 3 years ago

This is about how to make CPython faster. Feel free to contribute to PyPy, I'm sure they would appreciate it

I reckon they were pointing out since a working JIT already exists, why not incorporate that into CPython instead of redoing all that work.

v4dkou commented 3 years ago

why not incorporate that into CPython instead of redoing all that work.

Exactly, either that or show what will be done in a different way from predecessors.

This is about how to make CPython faster.

Do you mean specifically forking CPython and implementing JIT there? Why would that be better than alternative solutions? Why roll out your own JIT?