in reply to simple swap...
This is what I got using perl 5.004_04
use Benchmark;
timethese(10000000, {
'swap' => q{ ($d,$e) = ($e,$d) },
'three' => q{ { my $f = $d; $d = $e; $e = $f } },
});
Benchmark: timing 10000000 iterations of swap, three...
swap: 13 secs (13.29 usr 0.00 sys = 13.29 cpu)
three: 20 secs (19.45 usr 0.00 sys = 19.45 cpu)