Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8d4o-0007aB-SX for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Oct 2018 03:16:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g8d4n-0007Ow-6l for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Oct 2018 03:16:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8d4m-0007Op-SW for pgsql-hackers@lists.postgresql.org; Sat, 06 Oct 2018 03:16:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8d4k-0006m0-9E for pgsql-hackers@lists.postgresql.org; Sat, 06 Oct 2018 03:16:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w963GDXF013968; Fri, 5 Oct 2018 23:16:13 -0400 From: Tom Lane To: Andrew Gierth cc: Andres Freund , pgsql-hackers@lists.postgresql.org, Thomas Munro , Alexander Kuzmenkov Subject: Re: Performance improvements for src/port/snprintf.c In-reply-to: <87sh1jaiyq.fsf@news-spur.riddles.org.uk> References: <28321.1538585692@sss.pgh.pa.us> <20181003170043.thdyezozi343dkuc@alap3.anarazel.de> <2132.1538587869@sss.pgh.pa.us> <20181003173639.tncawup2nnkp7vbv@alap3.anarazel.de> <2435.1538588403@sss.pgh.pa.us> <20181003174513.wxjxfj7eepytnlqa@alap3.anarazel.de> <3316.1538589695@sss.pgh.pa.us> <20181003183552.xaams6fau3i7oybj@alap3.anarazel.de> <6797.1538592539@sss.pgh.pa.us> <30726.1538754899@sss.pgh.pa.us> <20181005165819.h7gdzcbwhnhofq2b@alap3.anarazel.de> <87sh1jaiyq.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Sat, 06 Oct 2018 04:10:00 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13966.1538795773.1@sss.pgh.pa.us> Date: Fri, 05 Oct 2018 23:16:13 -0400 Message-ID: <13967.1538795773@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Gierth writes: > So here's a thing: I finally got to doing my performance tests for using > the Ryu float output code in float[48]out. > Ryu is so blazing fast that with it, COPY of a table with 2million rows > of 12 random float8 columns (plus id) becomes FASTER in text mode than > in binary mode (rather than ~5x slower): Oh yeah? Where's the code for this? > (And yes, I've double-checked the results and they look correct, other > than the formatting differences. COPY BINARY seems to have a bit more > overhead than text mode, even for just doing integers, I don't know > why.) The per-column overhead is more (length word vs delimiter) and I think the APIs for send/recv functions are potentially a bit less efficient too. regards, tom lane