IronPython vs CPython: faster in 1.6 times?

mensanator at aol.com mensanator at aol.com
Tue Feb 5 17:35:53 EST 2008


On Feb 5, 3:56 pm, Arnaud Delobelle <arno... at googlemail.com> wrote:
> On Feb 5, 8:01 pm, Istvan Albert <istvan.alb... at gmail.com> wrote:
>
>
>
>
>
> > On Feb 5, 12:31 pm, dmitrey <dmitrey.kros... at scipy.org> wrote:
>
> > > Hi all,
> > > the urlhttp://torquedev.blogspot.com/2008/02/changes-in-air.html
> > > (blog of a game developers)
> > > says IronPython is faster than CPython in 1.6 times.
> > > Is it really true?
>
> > This is a second time around that IronPython piqued my interest
> > sufficiently to create a toy program to benchmark it and I must say
> > the results are not encouraging:
>
> > $ python bench.py
> > Elapsed time: 1.10 s
>
> > $ ipy bench.py
> > Elapsed time:65.01 s
>
> > and here is the benchmark program:
>
> > import time
> > start = time.time()
>
> > def foo(a):
> >     return a * a
>
> > data = {}
> > for i in xrange( 10**6 ):
> >     data[i] = foo(i)
>
> > print 'Elapsed time:%5.2f s' % ( time.time() - start)
>
> Could it be because .NET doesn't have arbitrary length integer types

A good reason to not use it.

> and your little benchmark will  create lots of integers > 2**32 ?
> What is the result if you replace foo(a) with
>
> def foo(a): return sqrt(a)
>
> --
> Arnaud- Hide quoted text -
>
> - Show quoted text -




More information about the Python-list mailing list