Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When a faster python?

There was the Unladen Swallow project that aims to get a faster python, but it seems to be stopped :

Is there a way to get a faster python, I mean faster than C-Python, without the use of psyco ?

like image 844
Eric Avatar asked Sep 11 '26 20:09

Eric


2 Answers

You could write hot code paths in Cython, Pyrex or Shedskin. That would have the positive side effect of forcing you to benchmark your code to find the hot paths in the first place, which in turn could lead to the (not implausible) revelation that Python performance may not be the actual bottleneck in your code.

like image 173
Benjamin Wohlwend Avatar answered Sep 13 '26 09:09

Benjamin Wohlwend


Sure. Use one of the variants that uses a JITer, such as IronPython, Jython, or PyPy.

like image 33
Ignacio Vazquez-Abrams Avatar answered Sep 13 '26 10:09

Ignacio Vazquez-Abrams