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 1g7m17-0003sH-Tv for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Oct 2018 18:37:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g7m16-00061C-E7 for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Oct 2018 18:37:00 +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 1g7m16-000614-3l for pgsql-hackers@lists.postgresql.org; Wed, 03 Oct 2018 18:37:00 +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 1g7m13-00008f-JF for pgsql-hackers@lists.postgresql.org; Wed, 03 Oct 2018 18:36:58 +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 w93IasdH006095; Wed, 3 Oct 2018 14:36:54 -0400 From: Tom Lane To: Andres Freund cc: Alexander Kuzmenkov , pgsql-hackers@lists.postgresql.org Subject: Re: Performance improvements for src/port/snprintf.c In-reply-to: <2845.1538589098@sss.pgh.pa.us> References: <14302.1538005507@sss.pgh.pa.us> <20180926235821.zmpxqv66ob7v2ffi@alap3.anarazel.de> <15882.1538007944@sss.pgh.pa.us> <20180927004022.lfhffbj3roxzf5ca@alap3.anarazel.de> <20180927005705.shbl3n5hq3t65n2j@alap3.anarazel.de> <20180927011814.kpncoksuqq3gy44s@alap3.anarazel.de> <15652.1538011825@sss.pgh.pa.us> <20181002201328.kauaofescppm54gq@alap3.anarazel.de> <30898.1538517873@sss.pgh.pa.us> <1680.1538587115@sss.pgh.pa.us> <20181003173936.uv3udmpovqizg4x6@alap3.anarazel.de> <2845.1538589098@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 03 Oct 2018 13:51:38 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6093.1538591814.1@sss.pgh.pa.us> Date: Wed, 03 Oct 2018 14:36:54 -0400 Message-ID: <6094.1538591814@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: >> Hm. I guess that'd be a bit better, but I'm not sure it's worth it. How >> about we simply add a static assert that long long isn't bigger than >> int64? > WFM, I'll make it happen. Actually, while writing a comment to go with that assertion, I decided this was dumb. If we're expecting the compiler to have "long long", and if we're convinced that no platforms define "long long" as wider than 64 bits, we may as well go with the s/int64/long long/g solution. That should result in no code change on any platform today. And it will still work correctly, if maybe a bit inefficiently, on some hypothetical future platform where long long is wider. We (or our successors) can worry about optimizing that when the time comes. regards, tom lane