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: pgsql-hackers@lists.postgresql.org, Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Alexander Kuzmenkov <a.kuzmenkov@postgrespro.ru>
Subject: Re: Performance improvements for src/port/snprintf.c
Date: Wed, 03 Oct 2018 12:22:13 -0400
Message-ID: <27041.1538583733@sss.pgh.pa.us> (raw )
In-Reply-To: <20181003161454.ozeioucsimjg5g6m@alap3.anarazel.de >
References: <20180927004022.lfhffbj3roxzf5ca@alap3.anarazel.de >
<20180927005705.shbl3n5hq3t65n2j@alap3.anarazel.de >
<87r2hffwda.fsf@news-spur.riddles.org.uk >
<CAEepm=1-3AG2O25VNnLXsjCM3EHBLW=jyJtpp_AMGG6a-GRJZA@mail.gmail.com >
<6FEC34CD-B8C0-44E2-8D1F-2320568BDC78@anarazel.de >
<30551.1538517271@sss.pgh.pa.us >
<20181003060936.zul7mfkcu5w7rotg@alap3.anarazel.de >
<25583.1538569214@sss.pgh.pa.us >
<20181003155207.b3lqmovuv2c5c4id@alap3.anarazel.de >
<26510.1538582852@sss.pgh.pa.us >
<20181003161454.ozeioucsimjg5g6m@alap3.anarazel.de >
Andres Freund <andres@anarazel.de> writes:
> On 2018-10-03 12:07:32 -0400, Tom Lane wrote:
>> [ scratches head ... ] How would that work? Seems like it necessarily
>> adds a strlen() call to whatever we'd be doing otherwise. palloc isn't
>> going to be any faster just from asking it for slightly fewer bytes.
>> I think there might be something wrong with your test scenario ...
>> or there's more noise in the numbers than you thought.
> I guess the difference is that we're more likely to find reusable chunks
> in aset.c and/or need fewer OS allocations. As the memory is going to
> be touched again very shortly afterwards, the cache effects probably are
> neglegible.
> The strlen definitely shows up in profiles, it just seems to save at
> least as much as it costs.
> Doesn't strike me as THAT odd?
What it strikes me as is excessively dependent on one particular test
scenario. I don't mind optimizations that are tradeoffs between
well-understood costs, but this smells like handwaving that's going to
lose as much or more often than winning, once it hits the real world.
regards, tom lane
view thread (65+ messages) latest in thread
Message-ID: <27041.1538583733@sss.pgh.pa.us>
Permalink: ../27041.1538583733@sss.pgh.pa.us/
Also on: postgresql.org/message-id/27041.1538583733@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, thomas.munro@enterprisedb.com, andrew@tao11.riddles.org.uk, a.kuzmenkov@postgrespro.ru
Subject: Re: Performance improvements for src/port/snprintf.c
In-Reply-To: <27041.1538583733@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