Re: inline newNode() - Mailing list pgsql-patches

From Neil Conway
Subject Re: inline newNode()
Date
Msg-id 873crgpme7.fsf@mailbox.samurai.com
Whole thread Raw
In response to Re: inline newNode()  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
Peter Eisentraut <peter_e@gmx.net> writes:
> Or make a version of palloc that zeroes the memory.

Well, we might lose a bit of speed that way -- with the current
MemSet() macro, most of the tests that MemSet() does can be eliminated
at compile-time, since MemSet() is usually called with some constant
parameters. If we moved this code inside palloc(), it wouldn't be
possible to do this constant propagation.

Not sure it would make a big performance difference, though -- and I
think palloc() is a clean solution. In fact, it's probably worth
having anyway: a lot of the call sites of palloc() immediately zero
the memory after they allocate it...

Cheers,

Neil

--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: inline newNode()
Next
From: Bruce Momjian
Date:
Subject: Re: inline newNode()