From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Richard Guo <guofenglinux(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: A performance issue with Memoize |
Date: | 2024-01-26 21:02:51 |
Message-ID: | CAApHDvpc=BgW0iSjvcQg-tf05Pd7-rcjccFzJsGiDe0srDG8Tg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, 27 Jan 2024 at 09:41, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> > I've adjusted the comments to what you mentioned and also leaned out
> > the pretty expensive test case to something that'll run much faster
> > and pushed the result.
>
> 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.
I can try changing the unique1 < 5 to unique1 < 4 to see that's more stable.
David
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-01-26 21:09:00 | Re: A performance issue with Memoize |
Previous Message | David Zhang | 2024-01-26 20:44:30 | Re: Functions to return random numbers in a given range |