[BangPypers] Are comprehensions faster?
Venkatraman S
venkat83 at gmail.com
Mon Feb 9 15:16:05 CET 2009
On Mon, Feb 9, 2009 at 7:11 PM, Senthil Kumaran <orsenthil at gmail.com> wrote:
> >
> > You see that is slow and the reason is l.append being called again
> > and again. lets eliminate it.
>
> Sorry, it is slow because the append method "Look-up" on the list
> object is done again and again.
>
Both LC and For-loops generate the same bytecodes!
-V-
http://twitter.com/venkat83
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20090209/7f2ac0c9/attachment.htm>
More information about the BangPypers
mailing list