Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCUuG-0006PD-9a for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Sep 2019 20:26:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iCUuF-00053A-43 for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Sep 2019 20:25:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCUuE-00052v-P5 for pgsql-hackers@lists.postgresql.org; Mon, 23 Sep 2019 20:25:58 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1iCUuC-0005tT-As for pgsql-hackers@postgresql.org; Mon, 23 Sep 2019 20:25:57 +0000 Received: by fetter.org (Postfix, from userid 1001) id 5A08A4084E; Mon, 23 Sep 2019 22:25:54 +0200 (CEST) Date: Mon, 23 Sep 2019 22:25:54 +0200 From: David Fetter To: Tels Cc: Andrew Gierth , Kyotaro Horiguchi , pgsql-hackers@postgresql.org Subject: Re: Efficient output for integer types Message-ID: <20190923202553.GM31596@fetter.org> References: <20190918034201.GX31596@fetter.org> <20190918.162746.139473050.horikyota.ntt@gmail.com> <20190920191450.GD31596@fetter.org> <20190920210916.GF31596@fetter.org> <20190920211813.GG31596@fetter.org> <87h856pekw.fsf@news-spur.riddles.org.uk> <20190921060835.GH31596@fetter.org> <87a7ayp4bm.fsf@news-spur.riddles.org.uk> <20190922215804.GL31596@fetter.org> <9cb0b9d6d98472d7d56dd6f78e9b40d4@bloodgate.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9cb0b9d6d98472d7d56dd6f78e9b40d4@bloodgate.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 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 http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate