> result = sum(range(1000000000))
>
> although it still took 10 minutes on my PC.

Did you mean to say "minutes" or rather "seconds" here? And did you
really mean to use "range" or rather "xrange" (or "range" in Py3)?

Yes, minutes and in Python 3.
And on a 2.8GHz 2 core CPU with 2G RAM

     sum(xrange(1000000000))

clearly runs in 12 seconds for me on Py2.6,

Well over a minute on 2.5 under Cygwin.
Dropping by an order of magnitude took it down to 17 secs
Which is exactly the same in Python 3...

Alan G.


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to