Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1

by Corion (Pope)
on Feb 06, 2019 at 08:59 UTC ( #1229456=note: print w/replies, xml ) Need Help??


in reply to Re: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
in thread Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1

This thread, especially the top post, already contains the Benchmark and the usual scaffolding so you can easily test the speed (and correctness) of your implementation. Maybe consider using that.

Also, I highly doubt that an implementation of Quicksort will beat the built-in sort keyword at least for the short lists that we are talking about here. Even though Perl sort uses a Mergesort, it will be hard for Perl code to beat the C code simply due to the amount of time spent in the Perl runloop.

  • Comment on Re^2: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1229456]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2021-10-21 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (82 votes). Check out past polls.

    Notices?