In article <[email protected]>, Paul Rubin <http://[email protected]> wrote: >[email protected] (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 ([email protected]) <*> 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
