in reply to •Re^6: Benchmark, -s versus schwartzian
in thread Benchmark, -s versus schwartzian
If sort {$a<=>$b} is indeed optimized (it seems so), you can just use it for a floating-point key, you just have to 'no warnings "numeric"; and put the float in the first place.
You are, however, right in that if the key is more complicated, this method is not applicable. (You can however gain with the ST only if calculating the key is much slower than comparing them.)
|
|---|