Re: Which qsort is used

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: Which qsort is used
Дата
Msg-id dnkaq4$1lqg$1@news.hub.org
обсуждение исходный текст
Ответ на Which qsort is used  (Qingqing Zhou <zhouqq@cs.toronto.edu>)
Список pgsql-hackers
"Bruce Momjian" <pgman@candle.pha.pa.us> wrote
>
> Are you willing to say that we should always prefer pgport over glibc's
> qsort()?
>

At least for Linux and windows. My test is performed on a dataset ranges 
from 10 to 15000000 elements. Each elements contains a 64 bytes garbage 
character area and an integer key, which is uniformly distributed from 1 to 
RANGE. RANGE takes values from 2 to 2^31. In all cases, our qsort absolutely 
wins. Maybe skewed distribution should be tested?

Another interesting thing is that the qsort on RANGE=2 or other small number 
in windows is terriblly slow - our version does not have this problem.

The test code could be found here (Note: it mixed with some other 
experiements I am doing but might be a good start point to construct your 
own tests):

http://www.cs.toronto.edu/~zhouqq/sort.c

Regards,
Qingqing 




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Which qsort is used
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: pg_relation_size locking