Re: Re: Which qsort is used

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Re: Which qsort is used
Дата
Msg-id 200512170108.jBH18DJ29580@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Which qsort is used  ("Luke Lonergan" <llonergan@greenplum.com>)
Ответы Re: Re: Which qsort is used  (Qingqing Zhou <zhouqq@cs.toronto.edu>)
Список pgsql-hackers
Luke Lonergan wrote:
> Tom,
> 
> On 12/12/05 2:47 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
> 
> > As those results suggest, there can be huge differences in sort
> > performance depending on whether the input is random, nearly sorted,
> > nearly reverse sorted, possesses many equal keys, etc.  It would be very
> > dangerous to say "implementation A is better than implementation B"
> > without having tested all those scenarios.
> 
> Yes.  The Linux glibc qsort is proven terrible in the general case by these
> examples though.
> 
> Bruce's point on that thread was that we shouldn't be replacing the OS
> routine in the general case.  On the other hand, there is the precedent of
> replacing Solaris' routine with the NetBSD version.

At this point, I think we have done enough testing on enough platforms
to just use port/qsort on all platforms in 8.2.  It seems whenever
someone tries to improve the BSD qsort, they make it worse.  

Were the BSD programmers geniuses and we are all idiots now, or what?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: reducing bloat in pg_statistic
Следующее
От: Qingqing Zhou
Дата:
Сообщение: Re: Re: Which qsort is used