Re: MemSet inline for newNode

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: MemSet inline for newNode
Дата
Msg-id 3167.1037038110@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: MemSet inline for newNode  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: MemSet inline for newNode  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I can't do MemSet in a macro that returns a value, as palloc requires.
> MemSet has a loop, and that can't be done in a macro that returns a value.

Hm.  How did Neil test this originally --- was he relying on being able
to "inline" newNode()?

Anyway, I don't think that passing an extra parameter can be a win.
If there has to be a runtime test, testing whether the two low bits
of the length are zero is probably about the same speed as testing a
boolean parameter.  It's unlikely to be enough slower to justify the
cost of passing another parameter.

            regards, tom lane

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: minor SGML fix
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: minor SGML fix