No built-in swap function?

Josiah Carlson jcarlson at uci.edu
Wed Apr 21 03:01:46 EDT 2004


> Having 100 times as many loops for the Psyco run (xrange(10000000))...
> 1 million tuple swaps in 0.125 seconds.
> 1 million temp swaps in 0.125 seconds.
> 1 million xor swaps in 1.04699993134 seconds.

That should be 100 million swaps.  My bad.

One thing...with psyco, tuple swaps are replaced by temp swaps, that's 
why they are equally as fast in the psyco test.

  - Josiah



More information about the Python-list mailing list