view python/pydc/examples/sintest.py @ 3:f5d4d5c2f750

- gemspec fix
author cslag
date Thu, 31 Dec 2015 20:24:53 +0100
parents 0cfcc391201f
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