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 1g8Tch-0003AY-9U for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Oct 2018 17:10:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g8Tcf-0007jc-Gk for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Oct 2018 17:10:41 +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 1g8Tcf-0007iT-5S for pgsql-hackers@lists.postgresql.org; Fri, 05 Oct 2018 17:10:41 +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 1g8Tcc-0002D1-HS for pgsql-hackers@lists.postgresql.org; Fri, 05 Oct 2018 17:10:39 +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 w95HAWSP031293; Fri, 5 Oct 2018 13:10:32 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org, Thomas Munro , Andrew Gierth , Alexander Kuzmenkov Subject: Re: Performance improvements for src/port/snprintf.c In-reply-to: <20181005165819.h7gdzcbwhnhofq2b@alap3.anarazel.de> 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> Comments: In-reply-to Andres Freund message dated "Fri, 05 Oct 2018 09:58:19 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31291.1538759432.1@sss.pgh.pa.us> Date: Fri, 05 Oct 2018 13:10:32 -0400 Message-ID: <31292.1538759432@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-10-05 11:54:59 -0400, Tom Lane wrote: >> I really think that what we ought to do is apply the float[48]out hack >> I showed in <30551.1538517271@sss.pgh.pa.us> and call it good, at least >> till such time as somebody wants to propose a full-on reimplementation of >> float output. I don't want to buy back into having platform dependencies >> in this area after having just expended a lot of sweat to get rid of them. > I'm not convinced. Because of some hypothetical platform that may > introduce strfromd() in a broken/slower manner, but where sprintf() is > correct, we should not do the minimal work to alleviate an actual > performance bottleneck in a trivial manner on linux? Our most widely > used platform? If we find a platform where it's borked, we could just > add a small hack into their platform template file. If it were a significant performance improvement, I'd be okay with that conclusion, but my measurements say that it's not. The extra complication is not free, and in my judgement it's not worth it. We certainly do need to buy back the performance we lost in float[48]out, but the hack I suggested does so --- on all platforms, not only Linux. regards, tom lane