I'm missing something here with range vs. xrange

Tim Chase python.list at tim.thechases.com
Fri Dec 7 18:16:17 EST 2007


>> Here's what I get;
>>
>> xRange 92.5529999733
>> Range 95.2669999599
> 
> Try tracking your memory usage during the benchmark and
> it will become very clear why xrange exists.

Or, when memory-constrained and this extra memory usage pushes
your machine to pound on your swap...not a pretty sight.

-tkc (from his box with a meager 96 megs of memory, though
<geezer>back when I worked on a machine with a copious 48k of
memory and enjoyed it...</geezer>)






More information about the Python-list mailing list