Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^4: Predefined Sort

by kyle (Abbot)
on Jun 20, 2008 at 17:47 UTC ( #693197=note: print w/replies, xml ) Need Help??

in reply to Re^3: Predefined Sort
in thread Predefined Sort

I usually think of the margin of error for Benchmark as about 10%. Any difference smaller than that is likely to be noise. This might also be a case where you move the code from place to place in the file and it changes speed (see No More Meaningless Benchmarks!).

Or maybe it's faster to say {$a<=>$b} rather than {$b<=>$a} for some reason. If I run your benchmark, changing only reverse sort to sort (so the 'reversed' case actually sorts forward), the results look about the same—{$a<=>$b} wins.

In any case, I'll probably keep thinking of them as "the same speed", benchmarks be damned.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://693197]
[Corion]: Yay, vacation time now - one week off work (but a Perl workshop in the middle ;)) )
[talexb]: TStanley I just realized that I was in your area for a convention back in April. We were at the high school for the weekend, the one with the long driveway. Nice spot.
[TStanley]: I am heading to Arlington, Virginia next week, then I get to spend an entire week at home. Looking forward to that as I will have spent 7 weeks on the road by the end of next week
[talexb]: That's a long road trip. I haven't travelled for business in years.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-06-23 14:21 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (548 votes). Check out past polls.