[pypy-svn] r62604 - pypy/branch/pyjitpl5/pypy/jit/tl

fijal at codespeak.net fijal at codespeak.net
Thu Mar 5 18:18:38 CET 2009


Author: fijal
Date: Thu Mar  5 18:18:37 2009
New Revision: 62604

Modified:
   pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_demo.py
Log:
Ok, let's start to collect functions that were tried at least


Modified: pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_demo.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_demo.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_demo.py	Thu Mar  5 18:18:37 2009
@@ -1,14 +1,27 @@
 
-def f():
-    print 543210
+def f0():
+    print "simple loop"
+
+    i = 0
+    while i < 100:
+        i = i + 3
+    print i
+
+def f1():
+    print "simple loop with inplace_add"
 
     i = 0
     while i < 100:
+        i += 3
+    print i
+
+def f():
+    print 543210
+
+    s = 0
+    for i in range(100):
         # XXX implement inplace_add method for ints
-        if i % 2:
-            i = i + 3
-        else:
-            i = i + 1
-    print i        # should print 102
+        s += i
+    print s        # should print 102
 
 f()



More information about the Pypy-commit mailing list