[Python-checkins] peps: PEP 418: Add link to benchmarking programs used to fill tables

victor.stinner python-checkins at python.org
Thu Apr 19 01:28:22 CEST 2012


http://hg.python.org/peps/rev/22ce683f1a34
changeset:   4271:22ce683f1a34
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Apr 19 01:28:22 2012 +0200
summary:
  PEP 418: Add link to benchmarking programs used to fill tables

files:
  pep-0418.txt |  32 ++++++++++++++++++++++++--------
  1 files changed, 24 insertions(+), 8 deletions(-)


diff --git a/pep-0418.txt b/pep-0418.txt
--- a/pep-0418.txt
+++ b/pep-0418.txt
@@ -800,7 +800,9 @@
 
 Reading an hardware clock has a cost.  The following table compares
 the performance of different hardware clocks on Linux 3.3 with Intel
-Core i7-2600 at 3.40GHz (8 cores).
+Core i7-2600 at 3.40GHz (8 cores). The `bench_time.c
+<http://hg.python.org/peps/file/tip/pep-0418/bench_time.c>`_ program
+was used to fill these tables.
 
 ========================  ======  =======  ======
 Function                  TSC     ACPI PM  HPET
@@ -817,10 +819,6 @@
 CLOCK_MONOTONIC            27 ns   723 ns  635 ns
 ========================  ======  =======  ======
 
-Each function was called 10,000,000 times and CLOCK_MONOTONIC was used
-to get the time before and after.  The benchmark was run 5 times to
-keep the minimum time.
-
 FreeBSD 8.0 in kvm with hardware virtualization:
 
 ========================  ======  =========  =======  =======
@@ -918,6 +916,11 @@
 GetTickCount64()           Windows Seven         16 ms                15 ms
 =========================  ================  =========  ===================
 
+The "Precision in Python" column was filled using the
+`clock_precision.py
+<http://hg.python.org/peps/file/tip/pep-0418/clock_precision.py>`_
+program.
+
 mach_absolute_time
 ^^^^^^^^^^^^^^^^^^
 
@@ -1165,6 +1168,11 @@
 ftime()                    Windows Seven            \-                 1 ms
 =========================  ================  =========  ===================
 
+The "Precision in Python" column was filled using the
+`clock_precision.py
+<http://hg.python.org/peps/file/tip/pep-0418/clock_precision.py>`_
+program.
+
 
 Windows: GetSystemTimeAsFileTime
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1240,6 +1248,11 @@
 clock()                    Windows Seven          1 ms                 1 ms
 =========================  ================  =========  ===================
 
+The "Precision in Python" column was filled using the
+`clock_precision.py
+<http://hg.python.org/peps/file/tip/pep-0418/clock_precision.py>`_
+program.
+
 Functions
 ^^^^^^^^^
 
@@ -1294,8 +1307,10 @@
 GetThreadTimes()           Windows Seven               16 ms                16 ms
 =========================  ================  ===============  ===================
 
-CLOCK_THREAD_CPUTIME_ID returns a number of CPU cycles, not a number of
-seconds.
+The "Precision in Python" column was filled using the
+`clock_precision.py
+<http://hg.python.org/peps/file/tip/pep-0418/clock_precision.py>`_
+program.
 
 
 Functions
@@ -1305,7 +1320,8 @@
   <http://msdn.microsoft.com/en-us/library/windows/desktop/ms683237(v=vs.85).aspx>`_.
   The precision can be read using GetSystemTimeAdjustment().
 * clock_gettime(CLOCK_THREAD_CPUTIME_ID): Thread-specific CPU-time
-  clock. The precision can be read using of clock_getres().
+  clock. It uses a number of CPU cycles, not a number of seconds.
+  The precision can be read using of clock_getres().
 
 See also the `QueryThreadCycleTime() function
 <http://msdn.microsoft.com/en-us/library/windows/desktop/ms684943(v=vs.85).aspx>`_

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list