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
