in reply to Re^2: Numeric Sort for Stringified Value (How to Avoid Warning) (Use the ST)
in thread Numeric Sort for Stringified Value (How to Avoid Warning)
For tiny sets, N log N is so similar to N that Schwartzian is pretty worthless. I changed
my @old = ("10.5 AA", "10.6 AA", "9 AC", "2 BB");
to
my @old = ("10.5 AA", "10.6 AA", "9 AC", "2 BB") x 100;
(and lowered the number of iterations to 2000) and yours took 1.5 times longer (25s vs 10s). Whether it's over-engineered or not depends on the input set.
|
|---|