Re: pgsql-server/src/backend executor/nodeAgg.c ut ... - Mailing list pgsql-committers

From Neil Conway
Subject Re: pgsql-server/src/backend executor/nodeAgg.c ut ...
Date
Msg-id 87smzm9ioq.fsf@mailbox.samurai.com
Whole thread Raw
In response to pgsql-server/src/backend executor/nodeAgg.c ut ...  (tgl@postgresql.org (Tom Lane))
Responses Re: pgsql-server/src/backend executor/nodeAgg.c ut ...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
tgl@postgresql.org (Tom Lane) writes:
>     Tweak a few of the most heavily used function call points to zero out
>     just the significant fields of FunctionCallInfoData, rather than MemSet'ing
>     the whole struct to zero.  Unused positions in the arg[] array will
>     thereby contain garbage rather than zeroes.  This buys back some of the
>     performance hit from increasing FUNC_MAX_ARGS.  Also tweak tuplesort.c
>     code for more speed by marking some routines 'inline'.  All together
>     these changes speed up simple sorts, like count(distinct int4column),
>     by about 25% on a P4 running RH Linux 7.2.

I didn't know we were still doing optimizations / features for 7.3 :-)

But very interesting results -- the 25% percent improvement is really
surprising. Do you think there's more low-hanging fruit in this area?

Also, is the use of inline functions encouraged instead of macros? As
of C99 they're a standard part of the language, but I'm not sure how
many compilers implemented them before that (GCC did, of course).

Cheers,

Neil

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

pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pgsql-server/src/backend executor/nodeAgg.c ut ...
Next
From: momjian@postgresql.org (Bruce Momjian - CVS)
Date:
Subject: pgsql-server/doc TODO