Psyco performance

Amaury Forgeot d'Arc afa at
Tue Jun 20 23:16:16 CEST 2006


Gregory Piñero a écrit :
> What's the reasoning behind requiring everything to be in functions?
> Just curious.

You may want to read this:

Psyco has to run the code at least once to emit code specialized for the 
actual data. It works by replacing blocks of code by other blocks, 
optimized for the kind of data seen the previous times.

On the contrary, the code outside functions is run only once. You'll 
never get the chance to run the optimized version again...


More information about the Python-list mailing list