ANN: a new utility for Python developers
Tom
tom-list at home.com
Sun Aug 19 23:35:44 EDT 2001
> [Thomas]
> >>> ...
> >>> - For timing, the clock() call in the windows CRT yields rather
> >>> innacurate data, so I had to use a Win32 call.
>
> [Tim]
> >> Note that *Python's* time.clock() on Windows uses the Win32
> >> QueryPerformanceCounter() call, which has better than microsecond
> >> resolution on virtually all Windows boxes.
>
> [Thomas]
> > Yup, that's the call I'm using. But initially I tried using the
> > CRT clock() function (I seem to remember that this is the function
> > used by the Python profiler).
>
>[Tim]
> I don't understand. The Python profiler is written in Python, and uses
> Python's time.clock(); it couldn't use a random C library function even if
> it wanted to. Python's time.clock() did call the msvcrt clock() on
Windows
> until early 1997, but has used QueryPerfomanceCouter() since then (ironic:
> except on Win64! QueryPerformanceCounter hadn't yet been implemented for
> Win64 when Trent Mick did that port).
Oh.
I had thought the Python profiler was written partly in C. Guess not.
Tom.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
More information about the Python-list
mailing list