Re: Why do we still perform a check for pre-sorted input within qsort variants?
От
Bruce Momjian
Тема
Re: Why do we still perform a check for pre-sorted input
within qsort variants?
Дата
Msg-id
20130308192158.GB3005@momjian.us
Ответ на
Список
Дерево обсуждения
Why do we still perform a check for pre-sorted input within qsort variants? Peter Geoghegan <peter.geoghegan86@gmail.com>
Re: Why do we still perform a check for pre-sorted input within qsort variants? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why do we still perform a check for pre-sorted input within qsort variants? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why do we still perform a check for pre-sorted input within qsort variants? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why do we still perform a check for pre-sorted input
within qsort variants? Robert Haas <robertmhaas@gmail.com>
Re: Why do we still perform a check for pre-sorted input
within qsort variants? Peter Geoghegan <peter.geoghegan86@gmail.com>
Re: Why do we still perform a check for pre-sorted input
within qsort variants? Bruce Momjian <bruce@momjian.us>
Re: Why do we still perform a check for pre-sorted input
within qsort variants? Dann Corbit <DCorbit@connx.com>
Re: Why do we still perform a check for pre-sorted input
within qsort variants? 'Bruce Momjian' <bruce@momjian.us>
Re: Why do we still perform a check for pre-sorted input
within qsort variants? Peter Geoghegan <peter.geoghegan86@gmail.com>
Re: Why do we still perform a check for pre-sorted input
within qsort variants? Dann Corbit <DCorbit@connx.com>
Re: Why do we still perform a check for pre-sorted input within qsort variants? Greg Stark <stark@mit.edu>
Re: Why do we still perform a check for pre-sorted input within
qsort variants? Dann Corbit <DCorbit@connx.com>
Re: Why do we still perform a check for pre-sorted input within qsort variants? Greg Stark <stark@mit.edu>
Re: Why do we still perform a check for pre-sorted input within
qsort variants? Dann Corbit <DCorbit@connx.com>
Re: Why do we still perform a check for pre-sorted input within
qsort variants? Dann Corbit <DCorbit@connx.com>
Re: Why do we still perform a check for pre-sorted input within qsort variants? Greg Stark <stark@mit.edu>
Re: Why do we still perform a check for pre-sorted input within
qsort variants? Dann Corbit <DCorbit@connx.com>
Re: Why do we still perform a check for pre-sorted input within qsort variants? Greg Stark <stark@mit.edu>
Re: Why do we still perform a check for pre-sorted input within
qsort variants? Dann Corbit <DCorbit@connx.com>
On Mon, Feb 25, 2013 at 02:31:21PM +0000, Peter Geoghegan wrote: > On 25 February 2013 11:49, Robert Haas wrote: > > I did attempt to do some tinkering with this while I was playing with > > it, but I didn't come up with anything really compelling. You can > > reduce the number of comparisons on particular workloads by tinkering > > with the algorithm, but then somebody else ends up doing more > > comparisons, so it's hard to say whether you've really made things > > better. Or at least I found it so. > > Right. > > To be honest, the real reason that it bothers me is that everything > else that our qsort routine does that differs from classic quicksort > (mostly quadratic insurance, like the median-of-medians pivot > selection, but also the fallback to insertion sort when n < 7) is very > well supported by peer reviewed research. Like Tom, I find it > implausible that Sedgewick and others missed a trick, where we did > not, particularly with something so simple. Perhaps we are more likely to be fed sorted data than a typical qsort usecase. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-hackers по дате отправления
От: Dann Corbit
Дата: