why are these exec times so different?

r.e.s. r.s at XXmindspring.com
Tue Dec 16 20:09:06 EST 2003


Should one expect the following execution times 
to be so different? ... 

Module_A takes about 4 seconds to run:
x = (stuff_1)
(stuff_2)

Module_B takes about 80 seconds to run:
x = (stuff_1)
def f(y):
    (stuff_2)
f(x)

where (stuff_1) and (stuff_2) are respectively 
the same in both modules.  I understand that 
they should differ in execution time, but by a
factor of 20?!

(I'll supply the actual code if requested, but
I didn't want to clutter things up needlessly.
I'm using PythonWin, win32all build 163.)

Thanks.
--
r.e.s.




More information about the Python-list mailing list