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
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to