Commits

Christian Heimes committed 1102221

more statistics

Comments (0)

Files changed (2)

 http://hg.python.org/features/pep-456/
 http://www.python.org/dev/peps/pep-0456/
 
+filename                               base    changed diff%  bmean  cmean  var    stdev
+linux_athlonX2-2/benchmark_x64         22.29   22.82   2.4%   0.495  0.507  0.002  0.039
+linux_athlonX2-2/benchmark_x64_sso7    22.32   23.39   4.8%   0.496  0.520  0.006  0.077
+linux_athlonX2-2/benchmark_x86         23.86   24.30   1.8%   0.542  0.552  0.001  0.030
+linux_athlonX2-2/benchmark_x86_sso6    23.92   24.59   2.8%   0.544  0.559  0.002  0.045
+linux_athlonX2/benchmark_x64           22.71   23.34   2.7%   0.505  0.519  0.002  0.045
+linux_athlonX2/benchmark_x64_sso7      22.86   23.82   4.2%   0.508  0.529  0.004  0.060
+linux_athlonX2/benchmark_x86           24.59   25.11   2.1%   0.559  0.571  0.001  0.032
+linux_athlonX2/benchmark_x86_sso6      24.47   25.34   3.6%   0.556  0.576  0.003  0.051
+linux_core_i7/benchmark_x64            16.26   16.45   1.2%   0.361  0.366  0.000  0.019
+linux_core_i7/benchmark_x64_sso7       16.15   16.17   0.1%   0.359  0.359  0.001  0.031
+linux_core_i7/benchmark_x86            16.59   16.73   0.8%   0.377  0.380  0.001  0.025
+linux_core_i7/benchmark_x86_sso6       16.81   17.40   3.5%   0.382  0.396  0.002  0.042
 
-filename                               base    changed diff%
-linux_athlonX2-2/benchmark_x64         22.29   22.82   2.4%
-linux_athlonX2-2/benchmark_x64_sso7    22.32   23.39   4.8%
-linux_athlonX2-2/benchmark_x86         23.86   24.30   1.8%
-linux_athlonX2-2/benchmark_x86_sso6    23.92   24.59   2.8%
-linux_athlonX2/benchmark_x64           22.71   23.34   2.7%
-linux_athlonX2/benchmark_x64_sso7      22.86   23.82   4.2%
-linux_athlonX2/benchmark_x86           24.59   25.11   2.1%
-linux_athlonX2/benchmark_x86_sso6      24.47   25.34   3.6%
-linux_core_i7/benchmark_x64            16.26   16.45   1.2%
-linux_core_i7/benchmark_x64_sso7       16.15   16.17   0.1%
-linux_core_i7/benchmark_x86            16.59   16.73   0.8%
-linux_core_i7/benchmark_x86_sso6       16.81   17.40   3.5%
+x64:
+  ELF 64-bit LSB executable, x86-64
+
+x86:
+  ELF 32-bit LSB executable, Intel 80386 (CFLAGS="-m32" LDFLAGS="-m32")
+
+SSO:
+  with small string optimization with Py_HASH_CUTOFF at 6 or 7
+
+Athlon X2:
+  AMD Athlon(tm) II X2 255, 2 x 3.10 GHz,
+  Ubuntu 12.04, GCC 4.6
+
+Core I7:
+  Intel Core i7-2860QM, 8 x 2.5 GHz (HT, turbo boost: 3.6 GHz),
+  Ubuntu 13.04, GCC 4.7
 """
 import os
 import csv
+import statistics
 
 def findcsv():
     for root, dirs, files in os.walk("."):
             yield row["Benchmark"], float(row["Base"]), float(row["Changed"])
 
 def analyze(lines):
-    base = sum(line[1] for line in lines)
-    changed = sum(line[2] for line in lines)
-    return base, changed, (changed/base - 1)*100.
+    base = []
+    changed = []
+    diff = []
+    for n, b, c in lines:
+        base.append(b)
+        changed.append(c)
+        diff.append(c - b)
+    bsum = sum(base)
+    bmean = statistics.mean(base)
+    csum = sum(changed)
+    cmean = statistics.mean(changed)
+    var = statistics.variance(diff)
+    dev = statistics.stdev(diff)
+    return bsum, csum, (csum/bsum - 1)*100., bmean, cmean, var, dev
 
 def main():
-    fmt = "{:<36}  {: 1.2f}  {: 1.2f}  {: 1.1f}%"
-    print("{:<36}   {}  {}   {}".format("filename", "base", "changed", "diff%"))
+    print("filename                               base    changed diff%  bmean  cmean  var    stdev")
+    fmt = "{:<36}  {: 1.2f}  {: 1.2f}  {: 1.1f}%  {: 1.3f} {: 1.3f}  {:1.3f}  {:1.3f}"
     for fname in sorted(findcsv()):
         lines = list(readcsv(fname))
         name = fname.lstrip("./")[:-4]