Mercurial > pub > dyncall > bindings
diff python/pydc/examples/sintest.py @ 0:0cfcc391201f
initial from svn dyncall-1745
author | Daniel Adler |
---|---|
date | Thu, 19 Mar 2015 22:26:28 +0100 |
parents | |
children | bf5625bb6f05 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/pydc/examples/sintest.py Thu Mar 19 22:26:28 2015 +0100 @@ -0,0 +1,33 @@ +import math +import os +import pydc + +def f1(n): + for x in xrange(n): + math.sin(x) +# filter( math.sin, range(0,n) ) + + +libc = pydc.load("msvcrt") +fpsin = pydc.find(libc,"sin") + +def libcsin(x): pass + +def f2(n): + for x in xrange(n): + pydc.call(fpsin,"d)d",float(x)) +# libcsin(i) + +# filter( libcsin , range(0,n) ) + + +#b = os.times() +f1(10000000) +#f2(10000000) +e = os.times() + +print e + + + +