view 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 source

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