Re: qsort (was Re: Solaris)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: dalgoda(at)ix(dot)netcom(dot)com (Mike Castle)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: qsort (was Re: Solaris)
Date: 2003-04-30 04:22:40
Message-ID: 19660.1051676560@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

dalgoda(at)ix(dot)netcom(dot)com (Mike Castle) writes:
> What about --with-pg-qsort (that defaults to use for currently known
> systems) with a test program people could run if they want?

I'd lean to "--with-pg-qsort" forcing the BSD qsort, "--without-pg-qsort"
forcing the native qsort, and if you don't say either then you get a
choice based on which OS you are running. (Not sure how hard this is
to do in the autoconf structure, but if we can do it, it seems like the
right user interface.)

> In that case, would counting the calls to the compare function be the
> appropriate measurement (I'd think either wall or system time would vary
> too widely).

I'd trust overall time measurements way more than call counts.
Obviously it's up to the user to hold overall system load and suchlike
outside factors constant while conducting the tests --- but measuring
any single component like comparison-function calls is just asking to be
misled.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-04-30 04:55:51 Re: fixed size columns
Previous Message Martijn van Oosterhout 2003-04-30 04:20:49 Re: qsort (was Re: Solaris)