comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:0cfcc391201f
1 import math
2 import os
3 import pydc
4
5 def f1(n):
6 for x in xrange(n):
7 math.sin(x)
8 # filter( math.sin, range(0,n) )
9
10
11 libc = pydc.load("msvcrt")
12 fpsin = pydc.find(libc,"sin")
13
14 def libcsin(x): pass
15
16 def f2(n):
17 for x in xrange(n):
18 pydc.call(fpsin,"d)d",float(x))
19 # libcsin(i)
20
21 # filter( libcsin , range(0,n) )
22
23
24 #b = os.times()
25 f1(10000000)
26 #f2(10000000)
27 e = os.times()
28
29 print e
30
31
32
33