Re: appendBinaryStringInfo stuff - Mailing list pgsql-hackers

From Tom Lane
Subject Re: appendBinaryStringInfo stuff
Date
Msg-id 920036.1671462745@sss.pgh.pa.us
Whole thread Raw
In response to Re: appendBinaryStringInfo stuff  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> I'm currently not sure why the macro trick increases the binary at
> all. I understand why the inline function does.

In the places where it changes the code at all, you're replacing

    appendStringInfoString(buf, s);

with

    appendBinaryStringInfo(buf, s, n);

Even if n is a constant, the latter surely requires more instructions
per call site.

Whether this is a win seems to depend on how many of these are
performance-critical.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Avoid generating SSL certs for LDAP tests
Next
From: Tom Lane
Date:
Subject: Re: meson files copyright