Skip site navigation (1) Skip section navigation (2)

Re: MemSet inline for newNode

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: MemSet inline for newNode
Date: 2002-11-11 18:08:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to


pgsql-hackers by date

Next:From: Robert E. BruccoleriDate: 2002-11-11 19:07:13
Subject: Re: Problem with 7.3 on Irix with dates before 1970
Previous:From: Tom LaneDate: 2002-11-11 16:56:35
Subject: Re: Implicit coercions, choosing types for constants, etc (yet again)

pgsql-patches by date

Next:From: Peter EisentrautDate: 2002-11-11 18:14:38
Subject: Re: minor SGML fix
Previous:From: Bruce MomjianDate: 2002-11-11 16:40:02
Subject: Re: MemSet inline for newNode

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group