[pypy-commit] pypy reflex-support: merge heads

wlav noreply at buildbot.pypy.org
Mon Jul 11 19:01:54 CEST 2011


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r45463:cc09cf376a35
Date: 2011-07-11 10:01 -0700
http://bitbucket.org/pypy/pypy/changeset/cc09cf376a35/

Log:	merge heads

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
@@ -1,11 +1,15 @@
+import cppyy
 
-try:
-    import numpy
-    a = numpy.array(range(10))
-    b = a + a + a
-    print b[3]
+import time
+import cppyy
+lib = cppyy.load_lib("../../module/cppyy/test/example01Dict.so")
+cls = cppyy._type_byname('example01')
+inst = cls.construct(-17)
+cppol = cls.get_overload("addDataToInt")
 
-except Exception, e:
-    print "Exception: ", type(e)
-    print e
-
+t1 = time.time()
+res = 0
+for i in range(1000000):
+    res += inst.invoke(cppol, i)
+t2 = time.time()
+print t2 - t1


More information about the pypy-commit mailing list