Re: Efficient output for integer types

From: David Fetter <david(at)fetter(dot)org>
To: Tels <nospam-pg-abuse(at)bloodgate(dot)com>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Efficient output for integer types
Date: 2019-09-23 20:25:54
Message-ID: 20190923202553.GM31596@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 23, 2019 at 10:28:09AM +0200, Tels wrote:
> Moin,
>
> On 2019-09-22 23:58, David Fetter wrote:
> > On Sat, Sep 21, 2019 at 07:29:25AM +0100, Andrew Gierth wrote:
> > > >>>>> "David" == David Fetter <david(at)fetter(dot)org> writes:
>
> > Fixed.
>
> Good work, more performance is sure nice :)
>
> Noticed one more thing in the patch:
>
> > - *start++ = *a;
> > - *a-- = swap;
> > + memcpy(pos - 2, DIGIT_TABLE + c, 2);
> > + i += 2;
> > }
> > + else
> > + *a = (char) ('0' + value2);
> > +
> > + return olength;
> > }
>
> The line "i += 2;" modifies i, but i is never used again nor returned.

I found a similar one in a similar function, and removed it, too.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Benjie Gillam 2019-09-23 21:34:07 [PATCH] Sort policies and triggers by table name in pg_dump.
Previous Message Andrew Dunstan 2019-09-23 20:12:45 Re: subscriptionCheck failures on nightjar