[pypy-commit] pypy rdict-experiments-2: rpythonize

fijal noreply at buildbot.pypy.org
Mon Jan 7 01:43:39 CET 2013


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: rdict-experiments-2
Changeset: r59831:237f60d5937f
Date: 2013-01-07 02:43 +0200
http://bitbucket.org/pypy/pypy/changeset/237f60d5937f/

Log:	rpythonize

diff --git a/pypy/translator/goal/targetbenchdict.py b/pypy/translator/goal/targetbenchdict.py
--- a/pypy/translator/goal/targetbenchdict.py
+++ b/pypy/translator/goal/targetbenchdict.py
@@ -19,20 +19,23 @@
 def entry_point(argv):
     bench_no = int(argv[1])
     bench_counter = int(argv[2])
-    d = {}
     if bench_no == 1:
+        d = {}
         for i in range(bench_counter):
             d[str(i)] = None
     if bench_no == 2: 
+        d = {}
         for i in range(bench_counter):
             d[i] = A(1, 2, 3)
     if bench_no == 3:
+        d = {}
         a = A(1, 2, 3)
         for i in range(bench_counter):
             if i % 100 == 0:
                 a = A(1, 2, 3)
             d[i] = a
     if bench_no == 4:
+        d = {}
         s = 0
         for i in range(bench_counter):
             d[i % 100] = i


More information about the pypy-commit mailing list