It feels so good, so quick and not C!

Michael Hudson mwh at python.net
Thu Mar 20 06:14:12 EST 2003


"Greg Ewing (using news.cis.dfn.de)" <me at privacy.net> writes:

> > Quoth John Machin:
> >>(3) The cuteness of swapping by "x, y = y, x" hides the overhead of
> >>packing and unpacking a 2-tuple, which may or may not be faster than
> >>the traditional 3-assignment method.
> 
> The bytecode compiler really ought to optimise this.

Do *you* want to add it to the current incarnation of
Python/compile.c?  Maybe when we get a proper abstract syntax...

Cheers,
M.

-- 
  The ultimate laziness is not using Perl.  That saves you so much
  work you wouldn't believe it if you had never tried it.
                                        -- Erik Naggum, comp.lang.lisp




More information about the Python-list mailing list