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

Alan Gauld alan.gauld at btinternet.com
Sun Aug 3 10:00:29 CEST 2008


"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?

Alan G.




More information about the Tutor mailing list