Execution of import (was Re: boolean xor)

Tim Peters tim.one at home.com
Mon Jan 8 00:24:12 EST 2001


[Delaney, Timothy]
> I think the real question here though is ... how much overhead is
> there in calling
>
> 	from operator import truch
>
> inside the function each time through (other than the first).
> There is some overhead in determining that the module is already
> imported (even though it should only be a dictionary lookup).

So time it!  That's easier than asking, and, even better, you'll believe the
result if you measure it yourself <0.9 wink>.

time.clock()-ly y'rs  - tim





More information about the Python-list mailing list