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: Michael Paquier <michael@paquier.xyz>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Allowing printf("%m") only where it actually works
Date: Wed, 26 Sep 2018 17:41:36 -0400
Message-ID: <25501.1537998096@sss.pgh.pa.us> (raw)
In-Reply-To: <20180926174645.nsyj77lx2mvtz4kx@alap3.anarazel.de>
References: <8770.1533931511@sss.pgh.pa.us>
	<16896.1533935042@sss.pgh.pa.us>
	<14925.1534040609@sss.pgh.pa.us>
	<1437.1534100930@sss.pgh.pa.us>
	<13183.1534624490@sss.pgh.pa.us>
	<30022.1534705920@sss.pgh.pa.us>
	<20180912070739.GK25160@paquier.xyz>
	<1304.1536774001@sss.pgh.pa.us>
	<20180914020256.GD29332@paquier.xyz>
	<13585.1537809527@sss.pgh.pa.us>
	<20180926174645.nsyj77lx2mvtz4kx@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> I'm not saying we shouldn't default to our printf - in fact I think we
> probably past due to use a faster float->string conversion than we
> portably get from the OS - but I don't think we can default to our
> sprintf without doing something about the float conversion performance.

Well, if you're unhappy about snprintf.c's performance, you could review
https://commitfest.postgresql.org/19/1763/
so I can push that.  In my tests, that got us down to circa 10% penalty
for float conversions.

More generally, I'm not averse to having our own float conversion code
if someone wants to put in the effort.  Performance aside, it'd be nice
to eliminate cross-platform differences in float output so we could get
rid of some of the Windows-specific regression result files.

			regards, tom lane




view thread (50+ messages)  latest in thread

Message-ID: <25501.1537998096@sss.pgh.pa.us>
Permalink:  ../25501.1537998096@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25501.1537998096@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, michael@paquier.xyz, thomas.munro@enterprisedb.com, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Allowing printf("%m") only where it actually works
  In-Reply-To: <25501.1537998096@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