No built-in swap function?

David Fraser davidf at sjsoft.com
Wed Apr 21 06:37:24 EDT 2004


Simon Wittber wrote:
>>That's 6 LOAD_FAST, and 3 STORE_FAST operations, plus XOR'ing.
> 
> 
> NB. I do not fully understand how psyco works.
> 
> The point I was trying to make, is that I expected a psyco optimised xor
> swap to optimise down to ~3 CPU instructions, much like my old C
> compiler once did.
> 
> AFAIK, psyco generates machine code, not python byte code?
> 
> Sw.
> 
> 
Yes, psyco generates machine code. But why not ask this on the psyco 
mailing list? Armin is very responsive

David



More information about the Python-list mailing list