2 Replies to “Gist of the Day: Quicksort”

  1. This may be an academic exercise but perl’s own sort() routine used quicksort method internally until version 5.7, when it was replaced by a more stable but just as efficient mergesort. You can still access the quicksort via a pragma but that may be deprecated in future versions. There is more info on the man page http://perldoc.perl.org/functions/sort.html.

    1. Yes, you are correct: Perl did use quicksort until 5.7 when it switched to mergesort (which was more efficient in more real-case scenarios).
      This was an exercise to demonstrate the algorithm.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.