On 04/09/2026 10:55, David Rowley wrote:
> On Fri, 4 Sept 2026 at 16:59, Michael Paquier <michael@paquier.xyz> wrote:
>> Any thoughts or comments from others?
> The patch adds PG_RETURN_INPUT(n) to avoid some of the branching in
> int4_sum() so that it immediately returns the aggstate when the value
> being aggregated is null. With my compiler, it cut int4_sum from 18
> down to 16 instructions.
Thanks for your attention.
I adopted your changes. Although I don't see any overhead beyond noise, it seems
better to optimise than to keep it as is.
Also, tests were rewritten - instead of a direct call, I have used the initcond
trick.
--
regards, Andrei Lepikhov,
pgEdge