In article <7xbpnuzw4u....@ruckus.brouhaha.com>, Paul Rubin <http://phr...@nospam.invalid> wrote: >a...@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 (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "as long as we like the same operating system, things are cool." --piranha -- http://mail.python.org/mailman/listinfo/python-list