while (a=b()) and sliding OFF-TOPIC

Gordon McMillan gmcm at hypernet.com
Mon May 17 17:17:07 EDT 1999


Jeremy wrote:

> >>>>> "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.

Does that mean you need a faster machine <wink>?

Reference:

Texas farmer <say, Cameron Laird>: "When Ah check mah fences, it 
takes me 2 whole days to drahv around mah spread."

Maine farmer <say, me>: "Ayuh. Had a car like that m'self, once."

- Gordon




More information about the Python-list mailing list