Re: Various performance questions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Various performance questions
Дата
Msg-id 1989.1067281788@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Various performance questions  (Neil Conway <neilc@samurai.com>)
Список pgsql-performance
Neil Conway <neilc@samurai.com> writes:
> Interesting. Is there a reason why int8 is pass-by-reference?

Pass-by-value types have to fit into Datum.

On a 64-bit machine (ie, one where pointers are 64-bits anyway) it would
make sense to convert int8 (and float8 too) into pass-by-value types.
If the machine does not already need Datum to be 8 bytes, though, I
think that widening Datum to 8 bytes just for the benefit of these two
datatypes would be a serious net loss.  Not to mention that it would
just plain break everything on machines with no native 8-byte-int
datatype.

One of the motivations for the version-1 function call protocol was to
allow the pass-by-value-or-by-ref nature of these datatypes to be hidden
from most of the code, with an eye to someday making this a
platform-specific choice.

            regards, tom lane

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Various performance questions
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Various performance questions