[pypy-commit] jitviewer default: add a demo

fijal noreply at buildbot.pypy.org
Sun Jul 17 12:52:32 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r146:0a357b9257ac
Date: 2011-07-17 12:52 +0200
http://bitbucket.org/pypy/jitviewer/changeset/0a357b9257ac/

Log:	add a demo

diff --git a/demo.py b/demo.py
new file mode 100644
--- /dev/null
+++ b/demo.py
@@ -0,0 +1,24 @@
+
+import re
+from numpy import zeros
+
+def g():
+    return 1
+
+def loop():
+    i = 0
+    while i < 10000:
+        if i & 2:
+            i += g()
+        else:
+            i += 3
+
+def other_loop():
+    for i in range(2000):
+        re.search("0", str(i))
+
+if __name__ == '__main__':
+    loop()
+    other_loop()
+    a = zeros(10000)
+    repr(a + a / a)


More information about the pypy-commit mailing list