Commits

Lukas Diekmann  committed 05a28c4

some adjustments for the paper checkout

  • Participants
  • Parent commits 946763d

Comments (0)

Files changed (10)

File gnuplot/latex/osheapsize.tex

-\begin{tabular}{ | l | | r | r | r| }
-\hline
-
-    benchmark & python & pypy-none & pypy\\
-    \hline
-    \hline
-    networkx & 115.27 & 129.07 & 68.47 \\
-\hline
-scapy & 19.75 & 51.25 & 51.33 \\
-\hline
-pyexcelerator & 168.94 & 189.35 & 188.17 \\
-\hline
-pydblite & 52.42 & 58.17 & 57.98 \\
-\hline
-pypy-interp & 46.88 & 96.55 & 94.11 \\
-\hline
-pypy-translate & 28.50 & 96.67 & 94.66 \\
-\hline
-whoosh & 16.04 & 50.36 & 51.57 \\
-\hline
-feedparser & 15.45 & 58.99 & 59.38 \\
-\hline
-nltk-wordassoc & 43.21 & 57.22 & 55.34 \\
-\hline
-disaster & 67.94 & 138.12 & 129.14 \\
-\hline
-multiwords & 20.46 & 47.12 & 46.96 \\
-\hline
-orm & 34.27 & 83.32 & 82.01 \\
-\hline
-findprimes & 9.75 & 24.04 & 19.42 \\
-\hline
-invindex & 13.28 & 28.88 & 25.92 \\
-\hline
-slowsets & 828.14 & 1045.84 & 721.70 \\
-\hline
-liststrategy* & 72.73 & 87.56 & 47.97 \\
-\hline
-setstrategy* & 82.15 & 112.19 & 72.66 \\
-\hline
-dictstrategy* & 96.93 & 115.84 & 103.48 \\
-\hline
-empty* & 6.06 & 16.74 & 16.45 \\
-\hline
-
-\end{tabular}

File gnuplot/latex/pypybench.tex

-\begin{tabular}{ | l | lr | lr| }
-\hline
-
-benchmark & \multicolumn{2}{|c|}{none} & \multicolumn{2}{|c|}{all} \\
-\hline
-\hline

File gnuplot/latex/speed.tex

-\begin{tabular}{ | l | | r | r | r| }
-\hline
-
-    benchmark & python & pypy-none & pypy\\
-    \hline
-    \hline
-    networkx & 7.00 & 6.50 & 3.87 \\
-\hline
-scapy & 2.34 & 4.88 & 4.53 \\
-\hline
-pyexcelerator & 75.22 & 39.76 & 37.76 \\
-\hline
-pydblite & 0.95 & 1.34 & 1.21 \\
-\hline
-pypy-interp & 39.17 & 25.68 & 24.34 \\
-\hline
-pypy-translate & 8.00 & 27.86 & 28.29 \\
-\hline
-whoosh & 4.02 & 4.47 & 4.43 \\
-\hline
-feedparser & 4.42 & 11.13 & 11.30 \\
-\hline
-nltk-wordassoc & 8.90 & 6.23 & 5.77 \\
-\hline
-disaster & 88.01 & 65.29 & 62.63 \\
-\hline
-multiwords & 3.47 & 4.85 & 4.62 \\
-\hline
-orm & 22.25 & 62.77 & 62.12 \\
-\hline
-findprimes & 13.55 & 1.37 & 1.21 \\
-\hline
-invindex & 41.47 & 94.27 & 8.51 \\
-\hline
-slowsets & 86.81 & 143.07 & 126.93 \\
-\hline
-liststrategy* & 1.22 & 1.79 & 0.71 \\
-\hline
-setstrategy* & 1.67 & 2.76 & 1.60 \\
-\hline
-dictstrategy* & 1.35 & 3.09 & 2.42 \\
-\hline
-empty* & 0.15 & 0.22 & 0.21 \\
-\hline
-
-\end{tabular}

File gnuplot/latextable_osheapsize.py

         except:
             continue
         all_full = [eval(l)[1][1][0] for l in f.readlines()]
-        avg_full = float(sum(all_full)) / len(all_full)
+        try:
+            avg_full = float(sum(all_full)) / len(all_full)
+        except:
+            continue
 
         # Standard deviation
         n = max(len(all_full),2)
 
 f.close()
 
-os.system("cp latex/osheapsize.tex /home/lukas/uni/memory_paper/tables/")
+#os.system("cp latex/osheapsize.tex /home/lukas/uni/memory_paper/tables/")

File gnuplot/latextable_speed.py

             speed = "0"
 
         all_full = [float(l) for l in f.readlines()]
-        avg_full = float(sum(all_full)) / len(all_full)
+        try:
+            avg_full = float(sum(all_full)) / len(all_full)
+        except ZeroDivisionError:
+            continue
 
         # Standard deviation
         n = max(len(all_full),2)
 
 f.close()
 
-os.system("cp latex/speed.tex /home/lukas/uni/memory_paper/tables/")
+#os.system("cp latex/speed.tex /home/lukas/uni/memory_paper/tables/")

File gnuplot/memup_pypy_vs_opt.py

         print "skipped", b
         continue
     try:
-        memup = float(data["pypy"][b]['avg']) / float(pypynone)
-    except:
+        pypydata = data["pypy"][b]['avg']
+    except KeyError:
+        print "skipped", b
+        continue
+    try:
+        memup = float(pypydata) / float(pypynone)
+    except ZeroDivisionError:
         memup = 0
     f.write(" %.2f" % memup)
     f.write("\n")

File gnuplot/parsepypybenchmarks.py

 from reader import calculate_error
 
 def parse_speed():
-    f = open("/home/lukas/pypy-benchmarks/speed.out","r")
+    f = open("../../pypy-benchmarks/speed.json","r")
     dump = json.loads(f.read())
     results = dump['results']
     return results

File gnuplot/reader.py

 import math
 
-executables = ["python", "pypy-none", "pypy", "pypy-32-setonly", "pypy-32-dictsonly", "pypy-32-attrsonly", "pypy-32-all"]
+#executables = ["python", "pypy-none", "pypy", "pypy-32-setonly", "pypy-32-dictsonly", "pypy-32-attrsonly", "pypy-32-all"]
+executables = ["python", "pypy-none", "pypy"]
 analysis = "osheapsize"
 
 benchmarks = ["networkx", "scapy", "pyexcelerator",
             try:
                 f = open(filename, 'r')
                 #import pdb;pdb.set_trace()
-            except:
+            except IOError:
+                print "no such file.skipped"
                 continue
+
             all_full = [eval(l)[1][1][0] for l in f.readlines()]
-            if all_full == []:
+            if all_full == [] or all_full is None:
+                print "empty data. skipped."
                 continue
+
             avg_full = float(sum(all_full)) / len(all_full)
 
             error = calculate_error(all_full, avg_full)

File gnuplot/speedup_pypy_vs_opt.py

     except KeyError:
         print "skipped", b
         continue
-    speedup = float(data["pypy"][b]['avg']) / float(pypynone)
+
+    try:
+        pypydata = data["pypy"][b]['avg']
+    except KeyError:
+        continue
+
+    speedup = float(pypydata) / float(pypynone)
     f.write(" %.2f" % speedup)
     f.write("\n")
 f.close()

File gnuplot/speedup_pypybenchmarks.py

 import os
 from parsepypybenchmarks import parse
 
-f = open("/home/lukas/pypy-benchmarks/speed.json","r")
+f = open("../../pypy-benchmarks/speed.json","r")
 dump = json.loads(f.read())
 results = dump['results']