[Tutor] Astonishing timing result

Marilyn Davis marilyn at deliberate.com
Thu Jun 26 02:50:14 CEST 2008


On Tue, June 24, 2008 10:16 pm, Dick Moores wrote:

> At 07:00 PM 6/24/2008, Marilyn Davis wrote:
>
>
>> Has anyone ever timed the difference between using a function that was
>> imported with:
>>
>> from my_module import MyFunction
>>
>> and:
>>
>>
>> import my_module
>
> Here are 2 comparisons: <http://py77.python.pastebin.com/f53ab3769>,
> and  <http://py77.python.pastebin.com/f68346b28>
>
> I don't see a significant difference.

Good.  Thank you.

I'm attaching another astonishing timing result, also wrong.

It's probably always true that if a timing result is astonishing, there's
a mistake somewhere, maybe in your thinking.

This one compares using os.popen, os.listdir, and subprocess.Popen.

Marilyn Davis


>
>
> Dick
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor


-------------- next part --------------
A non-text attachment was scrubbed...
Name: labxxx_1.py
Type: text/x-python
Size: 3126 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20080625/4cdc01e6/attachment.py>


More information about the Tutor mailing list