Re: Special-case executor expression steps for common combinations

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Special-case executor expression steps for common combinations
Date: 2024-09-10 08:54:36
Message-ID: B1676865-4899-4D9D-8A63-B9539010E325@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 22 Jul 2024, at 23:25, Andreas Karlsson <andreas(at)proxel(dot)se> wrote:
>
> I have bench marked the two patches now and failed to measure any speedup or slowdown from the first patch (removing return) but I think it is a good idea anyway.
>
> For the second patch (optimize strict) I managed to measure a ~1% speed up for the following query "SELECT sum(x + y + 1) FROM t;" over one million rows.

That's expected, this is mostly about refactoring the code to simplifying the
JITed code (and making tiny strides towards JIT expression caching).

> I would say both patches are ready for committer modulo my proposed style fixes.

I am a bit wary about removing the out_error label and goto since it may open
up for reports from static analyzers about control reaching the end of a
non-void function without a return. The other change has been incorporated.

The attached v3 is a rebase to handle executor changes done since v2, with the
above mentioned fix as well. If there are no objections I think we should
apply this version.

--
Daniel Gustafsson

Attachment Content-Type Size
v3-0001-Replace-EEOP_DONE-with-special-steps-for-return-n.patch application/octet-stream 11.7 KB
v3-0002-Add-special-case-fast-paths-for-strict-functions.patch application/octet-stream 8.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2024-09-10 09:31:45 Re: Jargon and acronyms on this mailing list
Previous Message Alvaro Herrera 2024-09-10 08:51:39 Re: First draft of PG 17 release notes