Re: Re: Which qsort is used

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Re: Which qsort is used
Дата
Msg-id 20051219113724.GD12251@svana.org
обсуждение исходный текст
Ответ на Re: Re: Which qsort is used  ("Dann Corbit" <DCorbit@connx.com>)
Ответы Re: Re: Which qsort is used  ("Luke Lonergan" <llonergan@greenplum.com>)
Список pgsql-hackers
On Fri, Dec 16, 2005 at 10:43:58PM -0800, Dann Corbit wrote:
> I am actually quite impressed with the excellence of Bentley's sort out
> of the box.  It's definitely the best library implementation of a sort I
> have seen.

I'm not sure whether we have a conclusion here, but I do have one
question: is there a significant difference in the number of times the
comparison routines are called? Comparisons in PostgreSQL are fairly
expensive given the fmgr overhead and when comparing tuples it's even
worse.

We don't want to accedently pick a routine that saves data shuffling by
adding extra comparisons. The stats at [1] don't say. They try to
factor in CPU cost but they seem to use unrealistically small values. I
would think a number around 50 (or higher) would be more
representative.

[1] http://www.cs.toronto.edu/~zhouqq/postgresql/sort/sort.html

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: [pgadmin-hackers] Client-side password encryption
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: [pgadmin-hackers] Client-side password encryption