| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Re: MemSet inline for newNode |
| Date: | 2002-11-11 19:18:15 |
| Message-ID: | 200211111918.gABJIFn21757@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> 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()?
Yes.
> 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.
OK, new version attached, with extra parameter removed.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
| Attachment | Content-Type | Size |
|---|---|---|
| unknown_filename | text/plain | 4.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2002-11-11 20:09:31 | Re: Implicit coercions, choosing types for constants, etc |
| Previous Message | Robert E. Bruccoleri | 2002-11-11 19:07:13 | Re: Problem with 7.3 on Irix with dates before 1970 |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2002-11-11 20:21:41 | Re: minor SGML fix |
| Previous Message | Bruce Momjian | 2002-11-11 19:06:54 | Re: minor SGML fix |