[Tutor] Why does counting to 20 million stress my computer?

Alan Gauld alan.gauld at blueyonder.co.uk
Tue Jul 20 23:41:38 CEST 2004


> So xrange is definitely quicker. Is it better to use xrange all the
time in
> place of range then ?

I haven't checked but my guess is that for small values range will be
faster
because it holds all the values in RAM and indexing will be faster
than
calculation.

But if in doubt try it out...
And tell us the result!

Alan G.



More information about the Tutor mailing list