No built-in swap function?

Simon Wittber drconrad at metaplay.com.au
Wed Apr 21 04:33:27 EDT 2004


>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.





More information about the Python-list mailing list