From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Subject: | Re: profiling connection overhead |
Date: | 2010-11-29 01:01:35 |
Message-ID: | 28452.1290992495@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Mon, Nov 29, 2010 at 12:33 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Another question that would be worth asking here is whether the
>> hand-baked MemSet macro still outruns memset on modern architectures.
>> I think it's been quite a few years since that was last tested.
> I know glibc has some sexy memset macros for cases where the size is a
> constant. I'm not sure there's been much of an advance in the general
> case though. This would tend to imply we should consider going the
> other direction of having the caller of palloc0 do the zeroing
> instead. Or making palloc0 a macro which expands to include calling
> memset with the parameter inlined.
Well, that was exactly the reason why we did it the way we do it.
However, I think it's probably only node allocations where the size
is likely to be constant and hence result in a win. Perhaps we should
implement makeNode() differently from the general case.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Itagaki Takahiro | 2010-11-29 01:06:42 | Re: Patch to add a primary key using an existing index |
Previous Message | Greg Stark | 2010-11-29 00:52:09 | Re: profiling connection overhead |