[Tutor] I can't believe this needs to be this complex

Dick Moores rdm at rcblue.com
Sun Aug 3 13:19:35 CEST 2008


At 01:00 AM 8/3/2008, Alan Gauld wrote:
>"Dick Moores" <rdm at rcblue.com> wrote
>
>>>>code I time. What's an example of code that would have System be 
>>>>greater than zero? And what's the distinction between User and 
>>>>System? (I'm using Win XP, if that's relevant.)
>
>It may be that XP doesn't report System time.
>
>>Well, here's one that reads in the text of Dickens' _Little Dorrit_ 
>>and returns the word count:
>>
>>IPython CPU timings (estimated):
>>Total runs performed: 10
>>   Times :      Total       Per run
>>   User  : 5.94446752311 s, 0.594446752311 s.
>>   System:        0.0 s,        0.0 s.
>
>I would definitely have expected some system time there.
>
>>This one is a Gui that has an Exit button. I called it and then hit 
>>the button:
>>
>>IPython CPU timings (estimated):
>>   User  : 10.5294301371 s.
>>   System:        0.0 s.
>
>That suggests that it is counting elapsed time as user time
>in which case I'm not sure how it counts system time.
>It may be an XP issue.
>
>Anyone got different results under Linux/MacOS?

_Little Dorrit_ is available in us-ascii at 
<http://www.gutenberg.org/etext/963>; _War and Peace_ at 
<http://www.gutenberg.org/etext/2600>.

Dick




More information about the Tutor mailing list