aahz at pythoncraft.com
Thu Jul 9 00:22:19 CEST 2009
In article <7xbpnuzw4u.fsf at ruckus.brouhaha.com>,
Paul Rubin <http://phr.cx@NOSPAM.invalid> wrote:
>aahz at pythoncraft.com (Aahz) writes:
>>Paul Rubin deleted an attribution:
>>>Avoid that len(tuple(g)), use something like the following, it's lazy
>>>and saves some memory.
>> The question is whether it saves time, have you tested it?
>len(tuple(xrange(100000000))) ... hmm.
When dealing with small N, O() can get easily swamped by the constant
factors. How often do you deal with more than a hundred fields?
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"as long as we like the same operating system, things are cool." --piranha
More information about the Python-list