Re: Fwd: GSOC 2018 Project - A New Sorting Routine

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Kefan Yang <starordust(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fwd: GSOC 2018 Project - A New Sorting Routine
Date: 2018-07-14 01:24:36
Message-ID: CAH2-Wz=UG59y7aCpmskGfNadjNs5ku6e2_gVWcPk4si9r9whfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 13, 2018 at 6:03 PM, Tomas Vondra
<tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
> Unlikely. The pivot randomization is merely a way to defeat an adversary
> attempting to perform DoS by triggering sorts on a killer sequence.
> Randomization makes it much harder/impossible, because the killer
> sequence changes over time. It's not a regular performance optimization.

+1. The importance of the quadratic worst case for an industrial
strength quicksort seems to often be overstated.

Robert Sedgewick's Algorithms book has *excellent* analysis of
quicksort's worst case, which might be worth a read.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin T Pryzby 2018-07-14 03:15:34 Re: Finding database for pg_upgrade missing library
Previous Message Tomas Vondra 2018-07-14 01:03:21 Re: Fwd: GSOC 2018 Project - A New Sorting Routine