in reply to Yet Another Sort Benchmarking Question

both
@foo = sort { $a cmp $b } @bar; @foo = sort { $a <=> $b } @bar;
are optimized by the perl compiler and instead of the perl comparison block an equivalent C function is used.