pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Alexander Kuzmenkov <a.kuzmenkov@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Performance improvements for src/port/snprintf.c
Date: Wed, 03 Oct 2018 14:36:54 -0400
Message-ID: <6094.1538591814@sss.pgh.pa.us> (raw)
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>

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




view thread (65+ messages)  latest in thread

Message-ID: <6094.1538591814@sss.pgh.pa.us>
Permalink:  ../6094.1538591814@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6094.1538591814@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, a.kuzmenkov@postgrespro.ru, pgsql-hackers@lists.postgresql.org
  Subject: Re: Performance improvements for src/port/snprintf.c
  In-Reply-To: <6094.1538591814@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox