Psyco performance
Amaury Forgeot d'Arc
afa at neuf.fr
Tue Jun 20 17:16:16 EDT 2006
Hello,
Gregory Piñero a écrit :
> What's the reasoning behind requiring everything to be in functions?
> Just curious.
You may want to read this:
http://psyco.sourceforge.net/introduction.html#differences-with-traditional-jit-compilers
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...
--
Amaury
More information about the Python-list
mailing list