Re: PG qsort vs. Solaris - Mailing list pgsql-hackers

From Neil Conway
Subject Re: PG qsort vs. Solaris
Date
Msg-id 1159895004.6242.11.camel@localhost.localdomain
Whole thread Raw
In response to Re: PG qsort vs. Solaris  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PG qsort vs. Solaris  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PG qsort vs. Solaris  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, 2006-10-03 at 10:48 -0400, Tom Lane wrote:
> I have no particular desire to introduce a version number check until we
> have to.  If you can show that the newer versions have a qsort that
> substantially *out-performs* ours

Are there any platform-local variants of qsort() that substantially
outperform our implementation? (I don't remember hearing of one, but I
might have missed it.) Given the time that has been spent working around
the braindamaged behavior of qsort() on various platforms, I would be
more inclined to *always* use our qsort() instead of the platform's
version. That way we'd get the same behavior across all platforms, and
we can at least verify that our implementation behaves reasonably for
the special cases we're interested in (presorted input, many-equal-keys,
etc.), and doesn't do crazy stuff like randomly switch to merge sort for
certain inputs.

-Neil




pgsql-hackers by date:

Previous
From: AgentM
Date:
Subject: Re: tsearch2 error msg
Next
From: Teodor Sigaev
Date:
Subject: Re: tsearch2 error msg