Author: Maciej Fijalkowski <[email protected]>
Branch: 
Changeset: r328:7674214f995f
Date: 2015-06-08 11:00 +0200
http://bitbucket.org/pypy/benchmarks/changeset/7674214f995f/

Log:    add another, slightly different, benchmark

diff --git a/warmup/function_call2.py b/warmup/function_call2.py
new file mode 100644
--- /dev/null
+++ b/warmup/function_call2.py
@@ -0,0 +1,34 @@
+
+import time
+l = []
+
+for i in range(200):
+    if i % 10 == 0:
+        print i
+    t0 = time.time()
+    exec """
+
+def k(a, b, c):
+    pass
+
+def g(a, b, c):
+    k(a, b + 1, c + 2)
+    k(a, b + 1, c + 2)
+    k(a, b + 1, c + 2)
+    k(a, b + 1, c + 2)
+    k(a, b + 1, c + 2)
+
+def f(i):
+    g(i, i + 1, i + 2)
+    g(i, i + 1, i + 2)
+    g(i, i + 1, i + 2)
+    g(i, i + 1, i + 2)
+    g(i, i + 1, i + 2)
+    g(i, i + 1, i + 2)
+for i in range(2000):
+    f(i)
+"""
+    l.append(time.time() - t0)
+    #l.append(0)
+
+print l
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to