Ok, we do better that way :)

I get ~6 seconds for CPython, and ~3.3 seconds on IronPython.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Timothy Fitz
Sent: Tuesday, August 22, 2006 7:01 AM
To: Discussion of IronPython
Subject: Re: [IronPython] [Simpy-users] RE: SimPy on IronPython timing test

On 8/21/06, Dino Viehland <[EMAIL PROTECTED]> wrote:
> I think our generator performance is about on-par w/ CPython, so I don't 
> believe this is the issue (we actually did improve this somewhat during the 
> middle of the beta cycle when we did our perf push).  But this test case:
>
> import time
>
> loops = 10000000
> def foo():
>     for i in range(loops): yield i
>
> x = time.clock(); y = foo()
> def timeit():
>     x = time.clock()
>     y = foo()
>     for i in range(loops): z = y.next()
>     end = time.clock()
>     print end - x
>
> timeit()
>
> takes about 8 seconds on my machine for both CPython & IronPython (CPython is 
> a little bit faster, but it's not very significant).

The time it takes here is probably dominated by the time it takes to allocate 
~80mb of ram from two 10,000,000-length lists, if try the tests again with 
xrange instead of range and post your results.
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to