Re: qsort (was Re: Solaris)

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: qsort (was Re: Solaris)
Дата
Msg-id 3EDA916F.5050109@paradise.net.nz
обсуждение исходный текст
Ответ на Re: qsort (was Re: Solaris)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
That is probably the most reasonable conclusion to draw from the results ;-)

cheers

Mark

Bruce Momjian wrote:

>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
>>
>>
>>
>
>
>


В списке pgsql-general по дате отправления:

Предыдущее
От: elein
Дата:
Сообщение: Re: server process segfaulting
Следующее
От: Mike Withers
Дата:
Сообщение: Linked Servers