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: | 2025-02-05 10:00:24 |
Message-ID: | E58D7259-CFCF-4430-A71D-A6E909A590EF@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 13 Sep 2024, at 15:01, Andreas Karlsson <andreas(at)proxel(dot)se> wrote:
>
> On 9/10/24 10:54 AM, Daniel Gustafsson wrote:
>>> 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).
>
> Yup! Expected and nice tiny speedup.
>
>>> 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.
>
> Sounds good to me and in my opinion this is ready to be committed.
This fell off the ever-growing TODO again. Re-reading it I still think it's a
good idea, it applied almost cleanly still and still gives a slight performance
improvement along with the more interesting refactoring which will make caching
of expressions easier down the line.
Attached is a rebased v4, unless there are objections I'll go ahead with this
version.
--
Daniel Gustafsson
Attachment | Content-Type | Size |
---|---|---|
v4-0002-Add-special-case-fast-paths-for-strict-functions.patch | application/octet-stream | 8.8 KB |
v4-0001-Replace-EEOP_DONE-with-special-steps-for-return-n.patch | application/octet-stream | 11.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michail Nikolaev | 2025-02-05 10:04:00 | Re: Why doesn't GiST VACUUM require a super-exclusive lock, like nbtree VACUUM? |
Previous Message | Álvaro Herrera | 2025-02-05 09:27:58 | Re: Better title output for psql \dt \di etc. commands |