[pypy-commit] extradoc extradoc: add relation of machine code to guard map data to the machine code size table

bivab noreply at buildbot.pypy.org
Wed Jul 25 15:26:53 CEST 2012


Author: David Schneider <david.schneider at picle.org>
Branch: extradoc
Changeset: r4360:a0903bdfc07f
Date: 2012-07-25 15:25 +0200
http://bitbucket.org/pypy/extradoc/changeset/a0903bdfc07f/

Log:	add relation of machine code to guard map data to the machine code
	size table

diff --git a/talk/vmil2012/tool/build_tables.py b/talk/vmil2012/tool/build_tables.py
--- a/talk/vmil2012/tool/build_tables.py
+++ b/talk/vmil2012/tool/build_tables.py
@@ -23,8 +23,8 @@
             '\\% guards b/o',
             'ops a/o',
             '\\% guards a/o',
-            'opt. rate',
-            'guard opt. rate']
+            'opt. rate in \\%',
+            'guard opt. rate in \\%']
 
     table = []
     # collect data
@@ -37,11 +37,9 @@
         res = [
                 bench['bench'].replace('_', '\\_'),
                 ops_bo,
-                "%.2f (%s)" % (guards_bo / ops_bo * 100,
-                                 bench['guard before']),
+                "%.2f" % (guards_bo / ops_bo * 100,),
                 ops_ao,
-                "%.2f (%s)" % (guards_ao / ops_ao * 100,
-                                  bench['guard after']),
+                "%.2f" % (guards_ao / ops_ao * 100,),
                 "%.2f" % ((1 - ops_ao / ops_bo) * 100,),
                 "%.2f" % ((1 - guards_ao / guards_bo) * 100,),
               ]
@@ -55,14 +53,18 @@
 
     head = ['Benchmark',
             'Machine code size (kB)',
-            'll resume data (kB)']
+            'll resume data (kB)',
+            '\\% of machine code size']
 
     table = []
     # collect data
     for bench in lines:
         bench['bench'] = bench['bench'].replace('_', '\\_')
         keys = ['bench', 'asm size', 'guard map size']
-        table.append([bench[k] for k in keys])
+        gmsize = int(bench['guard map size'])
+        asmsize = int(bench['asm size'])
+        rel = "%.2f" % (gmsize / asmsize * 100,)
+        table.append([bench[k] for k in keys] + [rel])
     output = render_table(template, head, sorted(table))
     write_table(output, texfile)
 


More information about the pypy-commit mailing list