public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alexander Lakhin <[email protected]>
To: Tom Lane <[email protected]>
To: David Rowley <[email protected]>
Cc: Richard Guo <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: A performance issue with Memoize
Date: Sat, 27 Jan 2024 07:00:01 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAMbWs48XHJEK1Q1CzAQ7L9sTANTs9W1cepXu8=Kc0quUL+tg4Q@mail.gmail.com>
<CAApHDvoTyLG35Rm26F7-MFmX3kv-uAs9FD4XF7fqy-B0W6o_UQ@mail.gmail.com>
<[email protected]>
<CAApHDvpEOYQeVAt7VxcZc6m7mZqSBxFSPfDNSZzCBcATQrfNzw@mail.gmail.com>
<[email protected]>
<CAApHDvpc=BgW0iSjvcQg-tf05Pd7-rcjccFzJsGiDe0srDG8Tg@mail.gmail.com>
<[email protected]>
Hello,
27.01.2024 00:09, Tom Lane wrote:
> David Rowley <[email protected]> writes:
>> On Sat, 27 Jan 2024 at 09:41, Tom Lane <[email protected]> wrote:
>>> drongo and fairywren are consistently failing the test case added
>>> by this commit. I'm not quite sure why the behavior of Memoize
>>> would be platform-specific when we're dealing with integers,
>>> but ...
>> Maybe snprintf(buf, "%.*f", 0, 5.0 / 2.0); results in "3" on those
>> rather than "2"?
>> Looking at the code in fmtfloat(), we fallback on the built-in snprintf.
> Maybe ... I don't have a better theory.
FWIW, I've found where this behaviour is documented:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprint...
(I've remembered a case with test/sql/partition_prune from 2020, where
sprintf on Windows worked the other way.)
Best regards,
Alexander
view thread (20+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: A performance issue with Memoize
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox