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 1g5JY0-0003Qf-El for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Sep 2018 23:48:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g5JXy-000240-S8 for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Sep 2018 23:48:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5JXy-00023s-Kx for pgsql-hackers@lists.postgresql.org; Wed, 26 Sep 2018 23:48:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5JXw-0008Rd-6l for pgsql-hackers@lists.postgresql.org; Wed, 26 Sep 2018 23:48:46 +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 w8QNme3v014451; Wed, 26 Sep 2018 19:48:40 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org Subject: Re: Performance improvements for src/port/snprintf.c In-reply-to: <20180926233205.c72ucwa5xc3ftxce@alap3.anarazel.de> References: <11787.1534530779@sss.pgh.pa.us> <20180926233205.c72ucwa5xc3ftxce@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 26 Sep 2018 16:32:05 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14449.1538005720.1@sss.pgh.pa.us> Date: Wed, 26 Sep 2018 19:48:40 -0400 Message-ID: <14450.1538005720@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > I kinda wonder if we shouldn't replace the non pg_* functions in > snprintf.c with a more modern copy of a compatibly licensed libc. Looks > to me like our implementation has forked off some BSD a fair while ago. Maybe, but the benchmarking I was doing last month didn't convince me that the *BSD versions were remarkably fast. There are a lot of cases where our version is faster. regards, tom lane