Comments on What I Talk About When I Talk About Sorting: Untangling Array#sort

8 Reader Comments

Back to the Article
  1. One thing I know about quicksort is that there is one particular initial state that will cause it to take n^2 time (orders of magnitude slower, with a large enough set). So this can allow an attacker to cause excessive cpu use. Various implementations choose a different split point so that obvious initial states (e.g., already sorted, or already reverse sorted) don’t trigger this but there is still a particular order that will.

    Does merge sort have something similar? Is there a quicksort implementation that eliminates this possibility even to someone who knows the implementation?

    Copy & paste the code below to embed this comment.
  2. Nice article! Need to be translated.

    Copy & paste the code below to embed this comment.
  3. Really great article. Even if Design as such is subjective you need criticism as you can not ignore the audience nor the client you are designing for.Thanks.

    Copy & paste the code below to embed this comment.
  4. Thanks!  This is a great read.

    Copy & paste the code below to embed this comment.
  5. Really great article. Even if Design as such is subjective you need criticism as you can not ignore the audience nor the client you are designing for. Thanks.
    http://flightstar.net

    Copy & paste the code below to embed this comment.
  6. Excuse my stupid question, but I don’t quite understand why more “operations per second” translates necessarely to faster sorting. One could argue that the fewer operations are required for a given task, the faster I’ll be done with it, no?

    Copy & paste the code below to embed this comment.
  7. Sorry, commenting is closed on this article.