Re: Which qsort is used - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Which qsort is used
Date
Msg-id 1134407746.9179.13.camel@localhost.localdomain
Whole thread Raw
In response to Re: Which qsort is used  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Which qsort is used
Re: Which qsort is used
List pgsql-hackers
On Mon, 2005-12-12 at 11:50 -0500, Bruce Momjian wrote:
> Are you willing to say that we should always prefer pgport over glibc's
> qsort()?

glibc's qsort is actually implemented via merge sort. I'm not sure why
the glibc folks chose to do that, but as a result, it's not surprising
that BSD qsort beats it for typical inputs. Whether we should go to the
trouble of second-guessing glibc is a separate question, though: it
would be good to see some performance figures for real-world queries.

BTW, Luke Lonergan recently posted some performance results for a fairly
efficient public domain implementation of qsort to the bizgres list:

http://lists.pgfoundry.org/pipermail/bizgres-general/2005-December/000294.html

-Neil




pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: pg_relation_size locking
Next
From: Qingqing Zhou
Date:
Subject: Re: Which qsort is used