From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Mark Kirkwood <markir(at)paradise(dot)net(dot)nz> |
Cc: | Mike Castle <dalgoda(at)ix(dot)netcom(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: qsort (was Re: Solaris) |
Date: | 2003-06-01 04:42:25 |
Message-ID: | 200306010442.h514gPg07975@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I assume we decided that BSD sort isn't fast enough to warrant replacing
the native qsort.
---------------------------------------------------------------------------
Mark Kirkwood wrote:
> Mike Castle wrote:
>
> >First I added a counter to the compare function, and the most cases, the
> >glibc implementation was called significantly less often than the BSD
> >compare function.
> >
> >
> Interesting - all examples I tried had glibc compare count higher, do
> you want to post one of yours?
>
> >In a simple test function, like comparing two ints, then yes, the BSD
> >implementation was faster. But in a more complex function, say comparing
> >strings, often times the glibc version was faster. Why? Because the
> >time spent in the compare function became the overwhelming factor.
> >
> >
> Considering strings is a good point - I went away and tried some
> examples, unfortunately I only managed to see BSD faster, but the
> difference was not as large as in the integer tests.
>
>
> regards
>
> Mark
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | elein | 2003-06-01 04:46:07 | Re: context in plpgsql functions |
Previous Message | Ron Johnson | 2003-06-01 03:14:23 | Re: Slashdot: SAP and MySQL Join Forces |