Author: Armin Rigo <[email protected]>
Branch: SpecialisedTuples
Changeset: r50376:f07d5e9e9d7a
Date: 2011-12-11 12:50 +0100
http://bitbucket.org/pypy/pypy/changeset/f07d5e9e9d7a/
Log: Update the demo.
diff --git a/pypy/jit/tl/pypyjit_demo.py b/pypy/jit/tl/pypyjit_demo.py
--- a/pypy/jit/tl/pypyjit_demo.py
+++ b/pypy/jit/tl/pypyjit_demo.py
@@ -2,13 +2,15 @@
pypyjit.set_param(threshold=200)
+def g(*args):
+ return len(args)
+
def f(n):
- pairs = [(0.0, 1.0), (2.0, 3.0)] * n
- mag = 0
- for (x1, x2) in pairs:
- dx = x1 - x2
- mag += ((dx * dx ) ** (-1.5))
- return n
+ s = 0
+ for i in range(n):
+ l = [i, n, 2]
+ s += g(*l)
+ return s
try:
print f(301)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit