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

From Zeugswetter Andreas DCP SD
Subject Re: PG qsort vs. Solaris
Date
Msg-id E1539E0ED7043848906A8FF995BDA579016267F7@m0143.s-mxs.net
Whole thread Raw
In response to Re: PG qsort vs. Solaris  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
> > So basically, glibc's qsort is bad enough that even a
> > 10%-more-comparisons advantage doesn't save it.

> Do those numbers look very different if you have lots of
> columns or if you're sorting on something like an array or a ROW?

Imho, that also is an argument for using our own qsort.
It can be extended to deal with high comparison function cost directly.

Thus I would opt to add a "comparison function cost" arg to qsort_arg
iff
we find scenarios where our qsort performs too bad.
This cost can be used to switch to merge sort for very high cost values.

Andreas


pgsql-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: cvsweb.cgi missing colors
Next
From: Oleg Bartunov
Date:
Subject: Re: Tsearch2 and Snowball