[Python-checkins] r46146 - sandbox/trunk/rjsh-pybench/pybench.py

"Martin v. Löwis" martin at v.loewis.de
Wed May 24 22:04:37 CEST 2006


Tim Peters wrote:
> Since timeit.py aims at small, fast-running code segments, it's doing
> exactly the right thing for that purpose.  If a Windows process-time
> gimmick were added, timeit.py would not want to use it (unless its
> _resolution_ was better than the Windows time.clock()).

GetProcessTimes results are measured in units of 100ns. Unfortunately,
the API documentation is silent as to what the actual resolution is,
however, I would expect that it is "precise", i.e. as close as possible
to the "one true" time as the scheduler can measure times. Even Linux
has a low-resolution clock only "on purpose": process times are measured
in "jiffies", and then scaled down to 100Hz because of backwards
compatibility.

Regards,
Martin


More information about the Python-checkins mailing list