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