Author: Maciej Fijalkowski <[email protected]>
Branch: extradoc
Changeset: r3750:54e949637e9e
Date: 2011-06-20 14:49 +0200
http://bitbucket.org/pypy/extradoc/changeset/54e949637e9e/

Log:    Add benchmark table - too big as of now

diff --git a/talk/iwtc11/benchmarks/parse.py b/talk/iwtc11/benchmarks/parse.py
new file mode 100644
--- /dev/null
+++ b/talk/iwtc11/benchmarks/parse.py
@@ -0,0 +1,41 @@
+
+import pdb, sys
+
+def main(name):
+    interp = None
+    res = {}
+    order = ['python2.7', 'python2.6 psyco-wrapper.py', 'pypy --jit 
enable_opts=intbounds:rewrite:virtualize:heap', 'pypy', 'gcc -O2', 'gcc -O3 
-march=native -fno-tree-vectorize']
+    with open(name) as f:
+        for line in f:
+            line = line.strip("\n")
+            if not line:
+                interp = None
+            elif interp is None:
+                interp = line
+            else:
+                bench, rest = line.split(':')
+                if '+-' in rest:
+                    a, d = rest.split('+-')
+                    res.setdefault(bench, {})[interp] = float(a), float(d)
+                else:
+                    res.setdefault(bench, {})[interp] = float(rest)
+    for key in sorted(res.keys()):
+        sys.stdout.write(key)
+        for ord in order:
+            try:
+                e = res[key][ord]
+            except KeyError:
+                sys.stdout.write(" & -")
+            else:
+                if isinstance(e, tuple):
+                    sys.stdout.write(' & %.2f +- %.2f' % (e[0], e[1]))
+                else:
+                    sys.stdout.write(' & %.2f' % e)
+        sys.stdout.write('\\\\\n')
+        print "\hline"
+
+if __name__ == '__main__':
+    try:
+        main('new_result.txt')
+    except:
+        pdb.post_mortem(sys.exc_info()[2])
diff --git a/talk/iwtc11/paper.tex b/talk/iwtc11/paper.tex
--- a/talk/iwtc11/paper.tex
+++ b/talk/iwtc11/paper.tex
@@ -36,6 +36,7 @@
 \usepackage{amsfonts}
 \usepackage[utf8]{inputenc}
 \usepackage{setspace}
+\usepackage{relsize}
 
 \usepackage{listings}
 
@@ -897,7 +898,59 @@
 peeling gives an additional XXX on average, which makes benchmark times
 comparable with native-compiled C code. Missing performance we attribute to
 the relative immaturity of PyPy's JIT assembler backend as well as missing
-optimizations, like instruction scheduling.
+optimizations, like instruction scheduling. Results:
+
+\begin{figure}
+\begin{center}
+{\small
+\begin{tabular}{|l|r|r|r|r|r|r|}
+\hline
+ & CPython & Psyco & PyPy no loop peeling & PyPy & GCC -O2 & GCC -O3\\
+\hline
+NoBorderImage & 537.31 & 329.98 & 2.22 +- 0.03 & 2.17 +- 0.02 & - & -\\
+\hline
+NoBorderImage(iter) & 548.32 & 304.13 & 1.45 +- 0.03 & 1.47 +- 0.02 & - & -\\
+\hline
+NoBorderImage(range) & 534.64 & 317.34 & 1.34 +- 0.03 & 1.40 +- 0.04 & - & -\\
+\hline
+NoBorderImagePadded & 543.73 & 333.20 & 2.09 +- 0.12 & 1.93 +- 0.05 & - & -\\
+\hline
+NoBorderImagePadded(iter) & 546.70 & 309.32 & 1.21 +- 0.02 & 0.49 +- 0.02 & - 
& -\\
+\hline
+NoBorderImagePadded(range) & 550.92 & 318.33 & 1.12 +- 0.03 & 0.48 +- 0.01 & - 
& -\\
+\hline
+conv3(1e5) & 77.89 & 9.52 & 1.77 +- 0.06 & 0.68 +- 0.02 & 0.70 +- 0.05 & 0.59 
+- 0.01\\
+\hline
+conv3(1e6) & 77.15 & 9.58 & 1.69 +- 0.01 & 0.77 +- 0.01 & 0.84 +- 0.05 & 0.74 
+- 0.01\\
+\hline
+conv3x3(1000) & 23.72 & 12.77 & 0.07 +- 0.00 & 0.05 +- 0.03 & 0.24 +- 0.00 & 
0.25 +- 0.01\\
+\hline
+conv3x3(3) & 23.85 & 12.77 & 0.10 +- 0.00 & 0.07 +- 0.00 & 0.27 +- 0.01 & 0.27 
+- 0.01\\
+\hline
+conv5(1e5) & 122.54 & 16.67 & 1.86 +- 0.02 & 1.05 +- 0.03 & 1.03 +- 0.05 & 
0.65 +- 0.01\\
+\hline
+conv5(1e6) & 125.77 & 16.80 & 1.92 +- 0.03 & 1.09 +- 0.02 & 1.07 +- 0.05 & 
0.80 +- 0.01\\
+\hline
+dilate3x3(1000) & 23.29 & 12.99 & 0.41 +- 0.04 & 0.39 +- 0.01 & 0.26 +- 0.00 & 
0.26 +- 0.01\\
+\hline
+sobel(NoBorderImagePadded) & 461.14 & 258.02 & 1.01 +- 0.03 & 0.48 +- 0.03 & - 
& -\\
+\hline
+sobel\_magnitude & - & - & - & - & 0.19 +- 0.01 & 0.20 +- 0.01\\
+\hline
+sobel\_uint8(NoBorderImagePadded) & 476.72 & 275.50 & 1.05 +- 0.01 & 0.51 +- 
0.00 & - & -\\
+\hline
+sqrt(Fix16) & 744.35 & 421.65 & 3.93 +- 0.11 & 2.14 +- 0.02 & 0.97 +- 0.02 & 
0.96 +- 0.01\\
+\hline
+sqrt(float) & 24.21 & 5.52 & 1.36 +- 0.03 & 1.00 +- 0.00 & 0.98 +- 0.00 & 0.98 
+- 0.00\\
+\hline
+sqrt(int) & 20.84 & 1.78 & 2.26 +- 0.01 & 1.82 +- 0.01 & 0.81 +- 0.01 & 0.80 
+- 0.01\\
+\hline
+
+\end{tabular}
+}
+\end{center}
+\end{figure}
+
 
 XXX add a small note somewhere that numpy and prolog are helped by this
 optimization
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to