[IronPython] SimPy on IronPython timing test
Klaus Muller
kgmuller at xs4all.nl
Thu Feb 2 07:56:57 CET 2006
All:
I have run a first simple benchmark to compare SimPy under IronPython with SimPy under CPython. I ran the following program:
from SimPy.Simulation import *
import time
class Dum(Process):
def run(self):
yield hold,self,3
initialize()
nrProcs=int(raw_input("Nr of processes?"))
processes=[Dum("Dum%s"%x) for x in range(1,nrProcs)]
for i in range(nrProcs):
p=Dum("%s"%i)
activate(p,p.run(),at=i)
tStart=(time.clock(),time.time())
simulate(until=2*nrProcs)
print "Ran in %s seconds for %s processes"%((time.clock()-tStart[0],time.time()-tStart[1]),nrProcs)
raw_input("Hit any key . . .")
Here are the results:
Nr processes=10000
------------------
IronPython: 2.06 seconds
CPython: 0.5 seconds
Nr processes=50000
------------------
IronPython: 15.53 seconds
CPython: 3.67 seconds
At this moment, IronPython is clearly way slower than CPython on this benchmark.
Clearly, it is early days for IronPython (this was run under beta release 2) and its developers will surely still optimize its performance a lot.
If Microsoft actually support IronPython, this will be an important SimPy platform in the future and we will have to watch its further development.
Klaus Müller
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3936 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060202/976fb3e6/attachment.bin>
More information about the Ironpython-users
mailing list