| From: | Andrei Lepikhov <lepihov(at)gmail(dot)com> |
|---|---|
| To: | David Geier <geidav(dot)pg(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andreas Karlsson <andreas(at)proxel(dot)se> |
| Subject: | Re: Numeric equality and hashing without detoasting |
| Date: | 2026-11-24 14:46:38 |
| Message-ID: | ba12a611-2cbc-4d20-8fbc-6751888a4e8e@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 24/11/2026 15:32, David Geier wrote:
>> It might seem overcomplicated for these speedup numbers. But it might be an
>> approach to speed up operations on other types too. So, I'll leave it here and
>> let the community decide.
> [1] also provided optimizations for a narrow subset of NUMERIC. I still
> don't think that's the way to go. I would prefer an approach that can be
> used for all NUMERIC code and that doesn't need two implementations for
> packed and unpacked. Fundamentally, all NUMERIC code can operate on
> packed representation with the caveat that reads must go through
> memcpy() due to possible alignment requirements. That's not so nice
> code-wise but doesn't matter for performance as the compiler will turn
> the memcpy() back into a single load instruction on architectures that
> support unaligned loads.
Thanks!
In these threads, I share optimisations that are already running in production
(I hope) and have proven efficient under real load. I’m not planning to insist
on pushing them into the community version, but they could help us better
understand and address current numeric bottlenecks.
--
regards, Andrei Lepikhov,
pgEdge
| From | Date | Subject | |
|---|---|---|---|
| Next Message | torikoshia | 2026-11-24 14:48:05 | Re: Why is the LSN reported for pg_logical_emit_message() different from other decoded operations? |
| Previous Message | David Geier | 2026-11-24 14:41:06 | Re: Use local buffer for packed numerics |