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: Tue, 02 Oct 2018 18:04:33 -0400
Message-ID: <30898.1538517873@sss.pgh.pa.us> (raw )
In-Reply-To: <20181002201328.kauaofescppm54gq@alap3.anarazel.de >
References: <15785.1536776055@sss.pgh.pa.us >
<20180926220419.lorxpb564gakdjkz@alap3.anarazel.de >
<20180926221814.el5nwmkez6zfmzbz@alap3.anarazel.de >
<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 >
Andres Freund <andres@anarazel.de> writes:
> I've looked through the patch. Looks good to me. Some minor notes:
[ didn't see this till after sending my previous ]
> - How about adding our own strchrnul for the case where we don't
> HAVE_STRCHRNUL? It's possible that other platforms have something
> similar, and the code wouldlook more readable that way.
Sure, we could just make a "static inline strchrnul()" for use when
!HAVE_STRCHRNUL. No objection.
> - I know it's not new, but is it actually correct to use va_arg(args, int64)
> for ATYPE_LONGLONG?
Well, the problem with just doing s/int64/long long/g is that the
code would then fail on compilers without a "long long" type.
We could ifdef our way around that, but I don't think the code would
end up prettier.
Given that we only ever use "ll" modifiers via INT64_FORMAT, and that
that'll only be set to "ll" if int64 is indeed "long long", those code
paths should be dead code in any situation where the type pun is wrong.
regards, tom lane
view thread (65+ messages) latest in thread
Message-ID: <30898.1538517873@sss.pgh.pa.us>
Permalink: ../30898.1538517873@sss.pgh.pa.us/
Also on: postgresql.org/message-id/30898.1538517873@sss.pgh.pa.us
copy link · copy postgr.es
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: <30898.1538517873@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