[pypy-svn] r52919 - pypy/branch/jit-hotpath/demo/jit
arigo at codespeak.net
arigo at codespeak.net
Tue Mar 25 16:25:25 CET 2008
Author: arigo
Date: Tue Mar 25 16:25:25 2008
New Revision: 52919
Modified:
pypy/branch/jit-hotpath/demo/jit/f1.py
Log:
Fix demo for the hotpath policy.
Modified: pypy/branch/jit-hotpath/demo/jit/f1.py
==============================================================================
--- pypy/branch/jit-hotpath/demo/jit/f1.py (original)
+++ pypy/branch/jit-hotpath/demo/jit/f1.py Tue Mar 25 16:25:25 2008
@@ -1,3 +1,4 @@
+import sys
import time
@@ -21,7 +22,9 @@
except ImportError:
print "No jit"
else:
- pypyjit.enable(f1.func_code)
+ if len(sys.argv) > 1:
+ pypyjit.setthreshold(int(sys.argv[1]))
+ pypyjit.enable()
res = f1(2117)
print res
More information about the Pypy-commit
mailing list