Re: Fixed length datatypes. WAS [GENERAL] UUID's as

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fixed length datatypes. WAS [GENERAL] UUID's as
Дата
Msg-id 25576.1151690366@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fixed length datatypes. WAS [GENERAL] UUID's as  (mark@mark.mielke.cc)
Список pgsql-hackers
mark@mark.mielke.cc writes:
> It depends how it is used. If the memory location needs to be
> allocated, for the value to be used only a few times, the overhead of
> allocation and redirection can be more expensive. If many though, than
> the reduction in value copying can make the pointer faster. 64-bytes,
> and 128-bytes are just on the line of not being clearly one or the
> other. It was just a thought though. The PostgreSQL API seemed pretty
> fixed the last time I looked at this stuff.

Yeah, changing the definition of Datum is probably out of the question ;-)
as it'd break not only most of core but every external module in existence.
Anything bigger than a "long" has to be pass-by-reference.  The
efficiency argument is wrong anyway, as we've optimized the heck out of
those code paths; very little actual copying happens unless a new value
is getting generated.  Pushing pointers around is definitely faster than
pushing multiword values around.
        regards, tom lane


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Fixed length datatypes. WAS [GENERAL] UUID's as
Следующее
От: "Marko Kreen"
Дата:
Сообщение: [RFC] txid: module for 64-bit external transaction IDs