No swap function in Python?

Thomas Wouters thomas at xs4all.net
Fri Jun 1 03:44:49 EDT 2001


On Thu, May 31, 2001 at 10:13:21AM +0200, Bolton, Gawain [ADC:4808:EXCH] wrote:

> pretend humans understand words more readily than symbolic notation - a swap
> function could generate the optimized code without any need for peephole
> optimization.

Except that a function call is *way* more expensive than tuple
packing/unpacking, even if only because a function call consists of a tuple
pack/unpack, among several other things.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list