Re: Using quicksort for every external sort run - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Using quicksort for every external sort run
Date
Msg-id CAM3SWZT_oS+-oQy4tMMj9HmSWTHqG7EnUKa0hS41b29Asqa36w@mail.gmail.com
Whole thread Raw
In response to Re: Using quicksort for every external sort run  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Fri, Dec 11, 2015 at 2:52 PM, Greg Stark <stark@mit.edu> wrote:
> Heh. And if I comment out the presorted check the breakeven point is
> *exactly* where the threshold is today at 7 elements -- presumably
> because Hoare chose it on purpose.

I think it was Sedgewick, but yes. I'd be very hesitant to mess with
the number of elements that we fallback to insertion sort on. I've
heard of people removing that optimization on the theory that it no
longer applies, but I think they were wrong to.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Caleb Welton
Date:
Subject: Re: Bootstrap DATA is a pita
Next
From: Caleb Welton
Date:
Subject: Re: Bootstrap DATA is a pita