"Dick Moores" <[EMAIL PROTECTED]> 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.


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to