while (a=b()) ...
Jeremy Hylton
jeremy at cnri.reston.va.us
Mon May 17 15:03:24 EDT 1999
>>>>> "TP" == Tim Peters <tim_one at email.msn.com> writes:
TP> You need to be much clearer about your claim here; certainly
TP> xrange(1000000) runs much faster than range(1000000) on anyone's
TP> machine (the former is constant time regardless of argument and
TP> the latter at best takes time proportional to a million), so
TP> your real complaint is about something else.
Actually, range(1000000) is faster on my machine. Something like 3%
faster, but still faster. Of course, if the program can amortize the
cost of creation/deletion across multiple iterations, it will be
substantially faster.
jeremy
More information about the Python-list
mailing list