Author: Remi Meier <remi.me...@inf.ethz.ch> Branch: extradoc Changeset: r5278:8da07b9a12bc Date: 2014-05-28 15:47 +0200 http://bitbucket.org/pypy/extradoc/changeset/8da07b9a12bc/
Log: add some no-jit performance graphs diff --git a/talk/dls2014/paper/paper.tex b/talk/dls2014/paper/paper.tex --- a/talk/dls2014/paper/paper.tex +++ b/talk/dls2014/paper/paper.tex @@ -1095,20 +1095,17 @@ we cannot compete well even with CPython, we later show JIT benchmarks where we see the unstable performance but also that we can still scale. (with more work we can use our STM system to parallelise jitted code -too)} +too)} See figure \ref{fig:performance-nojit} -more real benchmarks comparing multiple implementations: -\begin{itemize}[noitemsep] -\item pypy -\item pypy-jit -\item pypy-stm -\item pypy-stm-jit -\item cpython -\item jython -\end{itemize} +% TODO: pypy-nostm, Jython? +\begin{figure}[h] + \centering + \includegraphics[width=1\columnwidth]{plots/performance_nojit.pdf} + \caption{Comparing runtime between interpreters without a JIT\label{fig:performance-nojit}} +\end{figure} -% TODO: Jython +% TODO: Jython, compare to cpython? or just jython as common baseline with no-jit? \remi{Some benchmarks (figure \ref{fig:performance-jit} with enabled JIT show that we can be competitive with the other solutions. It also shows that more work is needed in that area to make performance more diff --git a/talk/dls2014/paper/plots/performance.pdf b/talk/dls2014/paper/plots/performance.pdf index 99fa8230f1a046efb2fe92225955fc00178fdaa0..5c6937be3742a98c828e64732cc1629cea90bbae GIT binary patch [cut] diff --git a/talk/dls2014/paper/plots/performance_nojit.pdf b/talk/dls2014/paper/plots/performance_nojit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6e5adc65ab8b4cdd8fa8f4e3cbd18757980afb93 GIT binary patch [cut] diff --git a/talk/dls2014/paper/plots/plot_performance.py b/talk/dls2014/paper/plots/plot_performance.py --- a/talk/dls2014/paper/plots/plot_performance.py +++ b/talk/dls2014/paper/plots/plot_performance.py @@ -29,7 +29,7 @@ # import pprint - slow as hell # threads -ts = range(1,5) + interps_styles = { "pypy-stm-jit": 'r-', @@ -126,13 +126,13 @@ -def plot_speedups(plt): +def plot_speedups(plt, w, h, benchs, interps_styles): import numpy as np from collections import OrderedDict fig = plt.figure() + ts = range(1,5) # threads legend = OrderedDict() - w, h = 2, 3 axs = {} for i, (name, contestants) in enumerate(benchs.items()): if i >= w: @@ -180,7 +180,7 @@ global fig print "Draw..." - legend = plot_speedups(plt) + legend = plot_speedups(plt, 2, 3, benchs, interps_styles) #axs[0].set_ylim(0, len(x)) #ax.set_yticks([r+0.5 for r in range(len(logs))]) diff --git a/talk/dls2014/paper/plots/plot_performance_nojit.py b/talk/dls2014/paper/plots/plot_performance_nojit.py new file mode 100755 --- /dev/null +++ b/talk/dls2014/paper/plots/plot_performance_nojit.py @@ -0,0 +1,177 @@ +#!/usr/bin/python + +# benchmarks-repo at 0d81c9b1ec8e + +# for now: avg & stddev of the best + +# pypy-c-paper-nojit bench.py -k5 raytrace/raytrace.py 1-4 256 256 +# pypy-c-paper-nojit bench.py -k5 btree/btree.py 1-4 500000 +# pypy-c-paper-nojit bench.py -k5 skiplist/skiplist.py 1-4 200000 +# pypy-c-paper-nojit bench.py -k5 threadworms/threadworms.py 1-4 500000 +# pypy-c-paper-nojit bench.py -k5 mandelbrot/mandelbrot.py 1-4 64 512 512 +# pypy-c-paper-nojit multithread-richards.py 30 1-4 # report runtime + + +from plot_performance import plot_speedups +import matplotlib +import os +import sys +matplotlib.use('gtkagg') + +from matplotlib import rc +#rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) +## for Palatino and other serif fonts use: +rc('font',**{'family':'serif','serif':['Palatino']}) +rc('text', usetex=True) + +args = None +import matplotlib.pyplot as plt +# import pprint - slow as hell + +# threads + + +interps_styles = { + "pypy-stm-nojit": 'r-', + "cpython": 'b--', + "best": "k:" +} + +benchs = { + "raytrace":{ + "pypy-stm-nojit":[ + [8.3], + [4.33], + [3.74], + [3.08] + ], + "cpython":[ + [2.5], + [2.7], + [2.75], + [2.84] + ]}, + + "btree":{ + "pypy-stm-nojit":[ + [8.3], + [4.9], + [3.9,4.3], + [4.4,4.0,4.3] + ], + "cpython":[ + [1.93], + [5.76], + [5.91], + [6.03] + ]}, + + "skiplist":{ + "pypy-stm-nojit":[ + [5.8], + [3.9], + [3.22,4.2,3.5], + [3.5,3.44,4.3] + ], + "cpython":[ + [3.3], + [4.9], + [5.0], + [5.1] + ]}, + + "threadworms":{ + "pypy-stm-nojit":[ + [4.8], + [2.7], + [2.0,2.2,2.1], + [2.1,2.3,2.2] + ], + "cpython":[ + [1.64], + [5], + [5.2], + [5.37] + ]}, + + "mandelbrot":{ + "pypy-stm-nojit":[ + [5.35], + [2.8], + [1.96,2.2], + [2.33,1.97] + ], + "cpython":[ + [1.65], + [2.4], + [2.4], + [2.5] + ]}, + + "richards":{ + "pypy-stm-nojit":[ + [11.2], + [6.1], + [5.4,4.9], + [4.8,4.9,5] + ], + "cpython":[ + [2.5], + [3.87], + [4.02], + [4.13] + ]} +} + + + + +def main(): + global fig + + print "Draw..." + legend = plot_speedups(plt, 2, 3, benchs, interps_styles) + + #axs[0].set_ylim(0, len(x)) + #ax.set_yticks([r+0.5 for r in range(len(logs))]) + #ax.set_yticklabels(range(1, len(logs)+1)) + #axs[0].set_xticks([]) + + # def label_format(x, pos): + # return "%.2f" % (abs((x - left) * 1e-6), ) + # major_formatter = matplotlib.ticker.FuncFormatter(label_format) + # axs[0].xaxis.set_major_formatter(major_formatter) + + #ax.set_title("Memory Usage in Richards") + + plt.draw() + #plt.show() + print "Drawn." + + file_name = "performance_nojit.pdf" + plt.savefig(file_name, format='pdf', + bbox_extra_artists=(legend,), + bbox_inches='tight', pad_inches=0) + + + +if __name__ == "__main__": + import argparse + parser = argparse.ArgumentParser(description='Plot stm log files') + parser.add_argument('--figure-size', default='7x8', + help='set figure size in inches: format=6x4') + parser.add_argument('--font-size', default='10.0', + help='set font size in pts: 10.0') + parser.add_argument('--png-dpi', default='300', + help='set dpi of png output: 300') + + + args = parser.parse_args() + matplotlib.rcParams.update( + {'figure.figsize': tuple(map(int, args.figure_size.split('x'))), + 'font.size': float(args.font_size), + 'savefig.dpi': int(args.png_dpi), + }) + + + main() _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit