Lukas Diekmann avatar Lukas Diekmann committed cec7bd3

some adjustments

Comments (0)

Files changed (12)

gnuplot/collect_containers_total.py

         for v in data[container].values():
             total += float(v)
 
-        if benchmark.endswith("strategy"):
+        if benchmark.endswith("strategy") or benchmark == "empty":
             benchmark += "*"
         f.write(benchmark)
         for typ in alltypes:

gnuplot/collect_histograms.py

 f.write("\n")
 
 for benchmark, data in alldata:
-    if benchmark.endswith("strategy"):
+    if benchmark.endswith("strategy") or benchmark == "empty":
         benchmark += "*"
     f.write(benchmark)
     for typ in alltypes:

gnuplot/latex/osheapsize.tex

-\begin{tabular}{ | l | | r | r | r | r | r | r | lr| }
+\begin{tabular}{ | l | | rr | rr | rr| }
 \hline
 
-benchmark & python & none & lists & sets & dicts & attrs & \multicolumn{2}{|c|}{all} \\
+benchmark & \multicolumn{2}{|c|}{python} & \multicolumn{2}{|c|}{pypy-none} & \multicolumn{2}{|c|}{pypy}\\
 \hline
 \hline
-networkx & 114.68 & 117.20 & 125.02 & 127.72 & 57.16 & 115.88 & 54.56 & \tiny{$\pm$ 0.36} \\
+networkx & 115.25 & \tiny{$\pm$ 0.00} & 128.96 & \tiny{$\pm$ 0.00} & 68.14 & \tiny{$\pm$ 0.23} \\
 \hline
-scapy & 18.81 & 51.34 & 51.18 & 51.14 & 51.10 & 51.12 & 50.69 & \tiny{$\pm$ 0.22} \\
+scapy & 19.86 & \tiny{$\pm$ 0.00} & 50.81 & \tiny{$\pm$ 0.00} & 50.79 & \tiny{$\pm$ 0.57} \\
 \hline
-pyexcelerator & 168.82 & 195.66 & 189.54 & 195.28 & 174.85 & 186.97 & 175.71 & \tiny{$\pm$ 0.06} \\
+pyexcelerator & 169.29 & \tiny{$\pm$ 0.00} & 189.28 & \tiny{$\pm$ 0.00} & 188.35 & \tiny{$\pm$ 0.64} \\
 \hline
-pydblite & 52.25 & 44.57 & 48.16 & 44.64 & 38.74 & 45.65 & 38.33 & \tiny{$\pm$ 0.01} \\
+pydblite & 52.43 & \tiny{$\pm$ 0.00} & 58.18 & \tiny{$\pm$ 0.00} & 57.97 & \tiny{$\pm$ 0.00} \\
 \hline
-pypy-interp & 86.66 & 97.55 & 93.23 & 96.04 & 90.76 & 97.95 & 88.22 & \tiny{$\pm$ 1.86} \\
+pypy-interp & 86.43 & \tiny{$\pm$ 0.00} & 96.79 & \tiny{$\pm$ 0.00} & 88.14 & \tiny{$\pm$ 0.00} \\
 \hline
-pypy-translate & 27.22 & 95.88 & 95.27 & 92.87 & 93.42 & 99.21 & 93.87 & \tiny{$\pm$ 3.05} \\
+pypy-translate & 28.45 & \tiny{$\pm$ 0.00} & 94.32 & \tiny{$\pm$ 0.00} & 95.14 & \tiny{$\pm$ 0.29} \\
 \hline
-whoosh & 15.66 & 52.51 & 51.07 & 51.04 & 50.95 & 51.43 & 50.99 & \tiny{$\pm$ 0.32} \\
+whoosh & 16.07 & \tiny{$\pm$ 0.00} & 50.31 & \tiny{$\pm$ 0.00} & 51.79 & \tiny{$\pm$ 1.27} \\
 \hline
-feedparser & 14.09 & 60.02 & 61.13 & 60.77 & 60.38 & 60.30 & 60.92 & \tiny{$\pm$ 0.50} \\
+feedparser & 15.46 & \tiny{$\pm$ 0.00} & 59.00 & \tiny{$\pm$ 0.00} & 59.25 & \tiny{$\pm$ 0.29} \\
 \hline
-nltk-wordassoc & 41.53 & 55.43 & 56.04 & 55.36 & 52.28 & 55.21 & 52.30 & \tiny{$\pm$ 0.05} \\
+nltk-wordassoc & 43.34 & \tiny{$\pm$ 0.00} & 57.22 & \tiny{$\pm$ 0.00} & 56.56 & \tiny{$\pm$ 4.13} \\
 \hline
-disaster & 56.79 & 130.45 & 135.62 & 131.00 & 135.60 & 135.00 & 123.33 & \tiny{$\pm$ 1.25} \\
+disaster & 67.95 & \tiny{$\pm$ 0.00} & 138.53 & \tiny{$\pm$ 0.00} & 128.66 & \tiny{$\pm$ 0.85} \\
 \hline
-bazaar & 63.63 & 176.81 & 181.40 & 182.21 & 186.79 & 190.34 & 176.57 & \tiny{$\pm$ 10.93} \\
+multiwords & 20.46 & \tiny{$\pm$ 0.00} & 47.42 & \tiny{$\pm$ 0.00} & 46.97 & \tiny{$\pm$ 0.04} \\
 \hline
-multiwords & 19.85 & 48.59 & 49.01 & 48.69 & 48.61 & 48.68 & 48.24 & \tiny{$\pm$ 0.19} \\
+orm & 33.55 & \tiny{$\pm$ 0.00} & 84.05 & \tiny{$\pm$ 0.00} & 81.67 & \tiny{$\pm$ 3.70} \\
 \hline
-orm & 32.90 & 75.36 & 77.54 & 75.43 & 75.85 & 78.53 & 74.07 & \tiny{$\pm$ 1.46} \\
+findprimes & 9.74 & \tiny{$\pm$ 0.00} & 24.05 & \tiny{$\pm$ 0.00} & 19.44 & \tiny{$\pm$ 0.01} \\
 \hline
-invindex & 13.03 & 25.52 & 27.45 & 24.64 & 25.71 & 25.50 & 23.75 & \tiny{$\pm$ 0.02} \\
+invindex & 13.28 & \tiny{$\pm$ 0.00} & 28.87 & \tiny{$\pm$ 0.00} & 25.91 & \tiny{$\pm$ 0.00} \\
 \hline
-slowsets & 905.90 & 917.62 & 1045.64 & 593.88 & 917.64 & 917.69 & 721.56 & \tiny{$\pm$ 0.03} \\
+slowsets & 828.13 & \tiny{$\pm$ 0.00} & 1045.80 & \tiny{$\pm$ 0.00} & 721.71 & \tiny{$\pm$ 0.01} \\
 \hline
-findprimes & 9.23 & 23.29 & 19.21 & 23.38 & 23.26 & 23.39 & 18.95 & \tiny{$\pm$ 0.02} \\
+liststrategy* & 72.73 & \tiny{$\pm$ 0.00} & 87.56 & \tiny{$\pm$ 0.00} & 47.96 & \tiny{$\pm$ 0.00} \\
 \hline
-liststrategy & 70.94 & 87.27 & 48.30 & 87.35 & 87.26 & 87.37 & 48.11 & \tiny{$\pm$ 0.02} \\
+setstrategy* & 82.16 & \tiny{$\pm$ 0.00} & 112.19 & \tiny{$\pm$ 0.00} & 72.66 & \tiny{$\pm$ 0.00} \\
 \hline
-setstrategy & 81.10 & 95.58 & 111.99 & 76.01 & 95.59 & 95.70 & 72.19 & \tiny{$\pm$ 0.02} \\
+dictstrategy* & 96.92 & \tiny{$\pm$ 0.00} & 115.84 & \tiny{$\pm$ 0.00} & 103.48 & \tiny{$\pm$ 0.00} \\
+\hline
+empty* & 6.05 & \tiny{$\pm$ 0.00} & 16.74 & \tiny{$\pm$ 0.00} & 16.45 & \tiny{$\pm$ 0.00} \\
 \hline
 
 \end{tabular}

gnuplot/latex/pypybench.tex

 benchmark & \multicolumn{2}{|c|}{none} & \multicolumn{2}{|c|}{all} \\
 \hline
 \hline
-ai & 0.2413 & \tiny{$\pm$ 0.0968} &0.1761 & \tiny{$\pm$ 0.0974} \\
-\hline
-bm\_chameleon & 0.0578 & \tiny{$\pm$ 0.0525} &0.0495 & \tiny{$\pm$ 0.0450} \\
-\hline
-bm\_mako & 0.1479 & \tiny{$\pm$ 0.0447} &0.1428 & \tiny{$\pm$ 0.0432} \\
-\hline
-chaos & 0.0439 & \tiny{$\pm$ 0.1276} &0.0370 & \tiny{$\pm$ 0.1276} \\
-\hline
-sphinx & 384.7070 &  & 382.0640 &   \\
-\hline
-crypto\_pyaes & 0.2004 & \tiny{$\pm$ 0.1004} &0.2002 & \tiny{$\pm$ 0.1012} \\
-\hline
-django & 0.1277 & \tiny{$\pm$ 0.0175} &0.1154 & \tiny{$\pm$ 0.0165} \\
-\hline
-fannkuch & 0.5973 & \tiny{$\pm$ 0.0175} &0.4937 & \tiny{$\pm$ 0.0178} \\
-\hline
-float & 0.1398 & \tiny{$\pm$ 0.0454} &0.1409 & \tiny{$\pm$ 0.0463} \\
-\hline
-genshi\_text & 0.0827 & \tiny{$\pm$ 0.1200} &0.0718 & \tiny{$\pm$ 0.1203} \\
-\hline
-genshi\_xml & 0.1903 & \tiny{$\pm$ 0.2527} &0.1795 & \tiny{$\pm$ 0.2546} \\
-\hline
-go & 0.2755 & \tiny{$\pm$ 0.1691} &0.2858 & \tiny{$\pm$ 0.2174} \\
-\hline
-html5lib & 10.2491 & \tiny{$\pm$ 5.7234} &9.6805 & \tiny{$\pm$ 5.1664} \\
-\hline
-json\_bench & 5.3425 & \tiny{$\pm$ 0.2416} &5.3540 & \tiny{$\pm$ 0.2600} \\
-\hline
-meteor-contest & 0.4472 & \tiny{$\pm$ 0.0294} &0.3409 & \tiny{$\pm$ 0.0332} \\
-\hline
-nbody\_modified & 0.1227 & \tiny{$\pm$ 0.0144} &0.1217 & \tiny{$\pm$ 0.0142} \\
-\hline
-pyflate-fast & 1.8605 & \tiny{$\pm$ 0.0548} &1.6684 & \tiny{$\pm$ 0.0584} \\
-\hline
-raytrace-simple & 0.0852 & \tiny{$\pm$ 0.0102} &0.0849 & \tiny{$\pm$ 0.0136} \\
-\hline
-richards & 0.0132 & \tiny{$\pm$ 0.0103} &0.0132 & \tiny{$\pm$ 0.0104} \\
-\hline
-slowspitfire & 1.1285 & \tiny{$\pm$ 0.0237} &0.9924 & \tiny{$\pm$ 0.0253} \\
-\hline
-spambayes & 0.2628 & \tiny{$\pm$ 0.2217} &0.2520 & \tiny{$\pm$ 0.2184} \\
-\hline
-spectral-norm & 0.0450 & \tiny{$\pm$ 0.0266} &0.0426 & \tiny{$\pm$ 0.0268} \\
-\hline
-spitfire & 6.8732 & \tiny{$\pm$ 0.3339} &7.1548 & \tiny{$\pm$ 0.3226} \\
-\hline
-spitfire\_cstringio & 5.3866 & \tiny{$\pm$ 0.2172} &5.3452 & \tiny{$\pm$ 0.1878} \\
-\hline
-sympy\_expand & 2.1035 & \tiny{$\pm$ 2.0126} &2.1314 & \tiny{$\pm$ 2.0531} \\
-\hline
-sympy\_integrate & 5.7656 & \tiny{$\pm$ 5.6782} &5.6902 & \tiny{$\pm$ 5.7986} \\
-\hline
-sympy\_str & 1.7621 & \tiny{$\pm$ 2.2802} &1.7686 & \tiny{$\pm$ 2.3327} \\
-\hline
-sympy\_sum & 1.4028 & \tiny{$\pm$ 0.9527} &1.4277 & \tiny{$\pm$ 0.9619} \\
-\hline
-telco & 0.1331 & \tiny{$\pm$ 0.0886} &0.1237 & \tiny{$\pm$ 0.0899} \\
-\hline
-twisted\_iteration & 0.0339 & \tiny{$\pm$ 0.0001} &0.0328 & \tiny{$\pm$ 0.0001} \\
-\hline
-twisted\_names & 0.0054 & \tiny{$\pm$ 0.0002} &0.0052 & \tiny{$\pm$ 0.0003} \\
-\hline
-twisted\_pb & 0.0462 & \tiny{$\pm$ 0.0024} &0.0453 & \tiny{$\pm$ 0.0022} \\
-\hline
-twisted\_tcp & 1.2741 & \tiny{$\pm$ 0.0479} &1.2553 & \tiny{$\pm$ 0.0554} \\
-\hline
-
-\end{tabular}

gnuplot/latex/speed.tex

-\begin{tabular}{ | l | | r | r | r | r | r | r | lr| }
+\begin{tabular}{ | l | | rr | rr | rr| }
 \hline
 
-benchmark & python & none & lists & sets & dicts & attrs & \multicolumn{2}{|c|}{all} \\
+benchmark & \multicolumn{2}{|c|}{python} & \multicolumn{2}{|c|}{pypy-none} & \multicolumn{2}{|c|}{pypy}\\
 \hline
 \hline
-networkx & 7.10 & 7.56 & 6.69 & 6.43 & 3.97 & 6.04 & 3.25 & \tiny{$\pm$ 0.54} \\
+networkx & 4.57 & \tiny{$\pm$ 0.00} & 6.48 & \tiny{$\pm$ 0.00} & 3.66 & \tiny{$\pm$ 0.02} \\
 \hline
-scapy & 2.53 & 5.63 & 5.07 & 5.07 & 4.70 & 4.87 & 4.53 & \tiny{$\pm$ 0.53} \\
+scapy & 3.17 & \tiny{$\pm$ 0.00} & 5.56 & \tiny{$\pm$ 0.00} & 4.52 & \tiny{$\pm$ 1.28} \\
 \hline
-pyexcelerator & 92.54 & 37.89 & 38.63 & 36.84 & 35.67 & 37.41 & 36.45 & \tiny{$\pm$ 0.31} \\
+pyexcelerator & 76.71 & \tiny{$\pm$ 0.00} & 40.02 & \tiny{$\pm$ 0.00} & 37.43 & \tiny{$\pm$ 0.63} \\
 \hline
-pydblite & 1.47 & 1.18 & 1.22 & 1.17 & 1.07 & 1.18 & 0.98 & \tiny{$\pm$ 0.04} \\
+pydblite & 1.08 & \tiny{$\pm$ 0.00} & 1.31 & \tiny{$\pm$ 0.00} & 1.19 & \tiny{$\pm$ 0.00} \\
 \hline
-pypy-interp & 54.99 & 28.96 & 28.54 & 28.55 & 26.85 & 35.32 & 26.87 & \tiny{$\pm$ 3.02} \\
+pypy-interp & 49.66 & \tiny{$\pm$ 0.00} & 27.09 & \tiny{$\pm$ 0.00} & 32.09 & \tiny{$\pm$ 0.00} \\
 \hline
-pypy-translate & 11.52 & 30.59 & 29.68 & 29.00 & 29.98 & 31.08 & 30.06 & \tiny{$\pm$ 1.19} \\
+pypy-translate & 10.04 & \tiny{$\pm$ 0.00} & 29.88 & \tiny{$\pm$ 0.00} & 28.73 & \tiny{$\pm$ 1.61} \\
 \hline
-whoosh & 5.92 & 5.08 & 4.64 & 4.68 & 4.62 & 4.81 & 4.54 & \tiny{$\pm$ 0.22} \\
+whoosh & 4.71 & \tiny{$\pm$ 0.00} & 4.96 & \tiny{$\pm$ 0.00} & 4.45 & \tiny{$\pm$ 0.65} \\
 \hline
-feedparser & 5.87 & 12.08 & 11.92 & 11.81 & 11.83 & 11.86 & 12.19 & \tiny{$\pm$ 1.05} \\
+feedparser & 7.00 & \tiny{$\pm$ 0.00} & 13.98 & \tiny{$\pm$ 0.00} & 11.37 & \tiny{$\pm$ 0.65} \\
 \hline
-nltk-wordassoc & 14.32 & 7.23 & 6.60 & 6.20 & 6.13 & 6.38 & 5.80 & \tiny{$\pm$ 1.09} \\
+nltk-wordassoc & 18.30 & \tiny{$\pm$ 0.00} & 12.75 & \tiny{$\pm$ 0.00} & 6.70 & \tiny{$\pm$ 3.54} \\
 \hline
-disaster & 108.35 & 65.55 & 68.10 & 65.64 & 64.48 & 66.34 & 65.86 & \tiny{$\pm$ 0.46} \\
+disaster & 89.50 & \tiny{$\pm$ 0.00} & 67.07 & \tiny{$\pm$ 0.00} & 62.33 & \tiny{$\pm$ 0.44} \\
 \hline
-bazaar & 586.62 & 328.05 & 350.52 & 388.34 & 358.86 & 346.50 & 348.21 & \tiny{$\pm$ 10.66} \\
+multiwords & 3.59 & \tiny{$\pm$ 0.00} & 4.86 & \tiny{$\pm$ 0.00} & 4.50 & \tiny{$\pm$ 0.03} \\
 \hline
-multiwords & 4.69 & 4.68 & 4.63 & 4.71 & 4.67 & 4.69 & 4.54 & \tiny{$\pm$ 0.02} \\
+orm & 22.24 & \tiny{$\pm$ 0.00} & 89.14 & \tiny{$\pm$ 0.00} & 77.14 & \tiny{$\pm$ 37.27} \\
 \hline
-orm & 24.07 & 27.53 & 27.64 & 27.63 & 26.64 & 28.27 & 27.05 & \tiny{$\pm$ 0.49} \\
+findprimes & 13.57 & \tiny{$\pm$ 0.00} & 1.94 & \tiny{$\pm$ 0.00} & 1.25 & \tiny{$\pm$ 0.01} \\
 \hline
-invindex & 52.67 & 91.36 & 107.30 & 91.72 & 92.47 & 92.72 & 8.04 & \tiny{$\pm$ 0.11} \\
+invindex & 41.89 & \tiny{$\pm$ 0.00} & 152.05 & \tiny{$\pm$ 0.00} & 8.41 & \tiny{$\pm$ 0.00} \\
 \hline
-slowsets & 93.32 & 148.99 & 159.77 & 175.71 & 147.47 & 187.56 & 113.79 & \tiny{$\pm$ 0.77} \\
+slowsets & 84.05 & \tiny{$\pm$ 0.00} & 137.90 & \tiny{$\pm$ 0.00} & 130.05 & \tiny{$\pm$ 38.75} \\
 \hline
-findprimes & 19.88 & 2.22 & 1.27 & 2.22 & 2.20 & 2.16 & 1.23 & \tiny{$\pm$ 0.04} \\
+liststrategy* & 1.27 & \tiny{$\pm$ 0.00} & 1.81 & \tiny{$\pm$ 0.00} & 0.72 & \tiny{$\pm$ 0.00} \\
 \hline
-liststrategy & 1.43 & 1.80 & 0.85 & 1.79 & 1.79 & 1.82 & 0.81 & \tiny{$\pm$ 0.01} \\
+setstrategy* & 1.70 & \tiny{$\pm$ 0.00} & 3.96 & \tiny{$\pm$ 0.00} & 1.63 & \tiny{$\pm$ 0.01} \\
 \hline
-setstrategy & 1.89 & 2.52 & 2.78 & 1.91 & 2.50 & 2.49 & 1.75 & \tiny{$\pm$ 0.01} \\
+dictstrategy* & 1.39 & \tiny{$\pm$ 0.00} & 3.17 & \tiny{$\pm$ 0.00} & 2.56 & \tiny{$\pm$ 0.00} \\
+\hline
+empty* & 0.11 & \tiny{$\pm$ 0.00} & 0.22 & \tiny{$\pm$ 0.00} & 0.21 & \tiny{$\pm$ 0.00} \\
 \hline
 
 \end{tabular}

gnuplot/latextable_osheapsize.py

 import math
 
 #executables = ["python", "default", "lists", "sets", "attributes"]
-executables = ["python", "pypy-32-none", "pypy-32-listonly", "pypy-32-setonly", "pypy-32-dictsonly", "pypy-32-attrsonly", "pypy-32-all"]
+executables = ["python", "pypy-none", "pypy"]
+#executables = ["python", "pypy-32-none", "pypy-32-listonly", "pypy-32-setonly", "pypy-32-dictsonly", "pypy-32-attrsonly", "pypy-32-all"]
 analysis = "osheapsize"
 
-benchmarks = ["networkx", "scapy", "pyexcelerator",
-              "pydblite", "pypy-interp", "pypy-translate","whoosh",
-              "feedparser", "nltk-wordassoc", "disaster",
-              "bazaar", "multiwords", "orm",
-              "invindex", "slowsets", "findprimes", "liststrategy", "setstrategy"]
+from reader import benchmarks
 
 data = {}.fromkeys(executables)
 for e in executables:
     print "Executable:", e
     bench_data = {}
     for b in benchmarks:
-        print "Fetching %s of %s" % (b, e)
         filename = "../csv/%s_%s_%s.csv" % (analysis, e, b)
+        print "Fetching %s of %s from %s" % (b, e, filename)
         try:
             f = open(filename, 'r')
             #import pdb;pdb.set_trace()
             continue
         all_full = [eval(l)[1][1][0] for l in f.readlines()]
         avg_full = float(sum(all_full)) / len(all_full)
-        print all_full
-        print avg_full
+        #print all_full
+        #print avg_full
 
         # Standardabweichung berechnen
         n = max(len(all_full),2)
         std = math.sqrt(c1 * c2)
         error = std * 1.959964
 
+        print error
+
         bench_data[b] = {}
         bench_data[b]["avg"] = "%.2f" % (avg_full / 1024**2)
         bench_data[b]["err"] = "%.2f" % (error / 1024**2)
 # column alignment
 f.write("{ | l |")
 for e in executables:
-    if e == "pypy-32-all":
-        f.write(" | lr")
-    else:
-        f.write(" | r")
+    f.write(" | rr")
+    #if e == "pypy-32-all":
+    #    f.write(" | lr")
+    #else:
+    #    f.write(" | r")
 f.write("| }\n")
 f.write("\hline\n")
 
+#benchmark & python & none & lists & sets & dicts & attrs & \multicolumn{2}{|c|}{all} \\\\
 f.write("""
-benchmark & python & none & lists & sets & dicts & attrs & \multicolumn{2}{|c|}{all} \\\\
+benchmark & \multicolumn{2}{|c|}{python} & \multicolumn{2}{|c|}{pypy-none} & \multicolumn{2}{|c|}{pypy}\\\\
 \hline
 \hline
 """)
 
 for b in benchmarks:
-    f.write(b)
+    if b.endswith("strategy") or b == "empty":
+        f.write(b + "*")
+    else:
+        f.write(b)
     for e in executables:
         f.write(" & ")
         if data[e].has_key(b):
             f.write(data[e][b]['avg'])
-            if e == "pypy-32-all":
-                f.write(" & ")
-                f.write("\\tiny{$\pm$ %s}" % data[e][b]['err'])
+            #if e == "pypy-32-all":
+            f.write(" & ")
+            f.write("\\tiny{$\pm$ %s}" % data[e][b]['err'])
         else:
             f.write("-")
     f.write(" \\\\\n")
 
 f.close()
 
-    #os.system("gnuplot osheapsize_"+e+".gpi -persist")
+os.system("cp latex/osheapsize.tex /home/lukas/uni/memory_paper/tables/")

gnuplot/latextable_speed.py

 import os
 import math
 
-executables = ["python", "pypy-32-none", "pypy-32-listonly", "pypy-32-setonly", "pypy-32-dictsonly", "pypy-32-attrsonly", "pypy-32-all"]
+#executables = ["python", "pypy-32-none", "pypy-32-listonly", "pypy-32-setonly", "pypy-32-dictsonly", "pypy-32-attrsonly", "pypy-32-all"]
+executables = ["python", "pypy-none", "pypy"]
 analysis = "osheapsize"
 
-benchmarks = ["networkx", "scapy", "pyexcelerator",
-              "pydblite", "pypy-interp", "pypy-translate","whoosh",
-              "feedparser", "nltk-wordassoc", "disaster",
-              "bazaar", "multiwords", "orm",
-              "invindex", "slowsets", "findprimes", "liststrategy", "setstrategy"]
+from reader import benchmarks
 
 data = {}.fromkeys(executables)
 for e in executables:
 # column alignment
 f.write("{ | l |")
 for e in executables:
-    if e == "pypy-32-all":
-        f.write(" | lr")
-    else:
-        f.write(" | r")
+    f.write(" | rr")
+    #if e == "pypy-32-all":
+    #    f.write(" | lr")
+    #else:
+    #    f.write(" | r")
 f.write("| }\n")
 f.write("\hline\n")
 
 #    f.write(" & ")
 #    f.write(e)
 #f.write("\\\\\n\hline\hline\n")
+#benchmark & python & none & lists & sets & dicts & attrs & \multicolumn{2}{|c|}{all} \\\\
 f.write("""
-benchmark & python & none & lists & sets & dicts & attrs & \multicolumn{2}{|c|}{all} \\\\
+benchmark & \multicolumn{2}{|c|}{python} & \multicolumn{2}{|c|}{pypy-none} & \multicolumn{2}{|c|}{pypy}\\\\
 \hline
 \hline
 """)
 
 for b in benchmarks:
-    f.write(b)
+    if b.endswith("strategy") or b == "empty":
+        f.write(b + "*")
+    else:
+        f.write(b)
     for e in executables:
         f.write(" & ")
         if data[e].has_key(b):
             f.write(data[e][b]['avg'])
-            if e == "pypy-32-all":
-                f.write(" & ")
-                f.write("\\tiny{$\pm$ %s}" % data[e][b]['err'])
+            #if e == "pypy-32-all":
+            f.write(" & ")
+            f.write("\\tiny{$\pm$ %s}" % data[e][b]['err'])
         else:
             f.write("-")
     f.write(" \\\\\n")
 
 f.close()
 
-    #os.system("gnuplot osheapsize_"+e+".gpi -persist")
+os.system("cp latex/speed.tex /home/lukas/uni/memory_paper/tables/")

gnuplot/memup_pypy_vs_opt.py

 for b in benchmarks:
     try:
         pypynone = data["pypy-none"][b]['avg']
-        if b.endswith("strategy"):
+        if b.endswith("strategy") or b == "empty":
             f.write(b + "*")
         else:
             f.write(b)

gnuplot/parsepypybenchmarks.py

 import json
 from reader import calculate_error
 
-def parse():
-    f = open("/home/lukas/pypy-benchmarks/out.json","r")
+def parse_speed():
+    f = open("/home/lukas/pypy-benchmarks/speed.out","r")
     dump = json.loads(f.read())
     results = dump['results']
     return results
 
-results = parse()
+results = parse_speed()
 
 f = open("latex/pypybench.tex", "w")
 f.write("\\begin{tabular}")

gnuplot/reader.py

 executables = ["python", "pypy-none", "pypy", "pypy-32-setonly", "pypy-32-dictsonly", "pypy-32-attrsonly", "pypy-32-all"]
 analysis = "osheapsize"
 
-benchmarks = ["empty", "networkx", "scapy", "pyexcelerator",
+benchmarks = ["networkx", "scapy", "pyexcelerator",
                   "pydblite", "pypy-interp", "pypy-translate","whoosh",
                   "feedparser", "nltk-wordassoc", "disaster",
                   "multiwords", "orm", "findprimes",
-                  "invindex", "slowsets", "liststrategy", "setstrategy", "dictstrategy"]
+                  "invindex", "slowsets", "liststrategy", "setstrategy", "dictstrategy", "empty"]
 
 def read_memory():
     data = {}.fromkeys(executables)

gnuplot/speedup_pypy_vs_opt.py

 for b in benchmarks:
     try:
         pypynone = data["pypy-none"][b]['avg']
-        if b.endswith("strategy"):
+        if b.endswith("strategy") or b == "empty":
             f.write(b + "*")
         else:
             f.write(b)

gnuplot/speedup_pypybenchmarks.py

 import os
 from parsepypybenchmarks import parse
 
-results = parse()
+results = parse_speed()
 
 f = open("data/speedup_pypy.dat", "w")
 
 for b in results:
+    name = b[0]
+    print "fetching", name
+
     d = b[2]
     base = d['base_times'] # none
     change = d['changed_times'] # all
         print "skipped", base, change
         continue
 
-    name = b[0]
-    print "fetching", name
     f.write(name)
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.