Re: Special-case executor expression steps for common combinations - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: Special-case executor expression steps for common combinations
Date
Msg-id 97ded65b-6188-4922-a12b-020bba8ec852@proxel.se
Whole thread Raw
In response to Special-case executor expression steps for common combinations  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Special-case executor expression steps for common combinations
Re: Special-case executor expression steps for common combinations
List pgsql-hackers
On 10/12/23 11:48 AM, Daniel Gustafsson wrote:
> Thoughts?

I have looked at the patch and it still applies, builds and passes the 
test cases and I personally think these optimizations are pretty much 
no-brainers that we should do and it is a pity nobody has had the time 
to review this patch.

1) The no-return case should help with the JIT, making jitted code faster.

2) The specialized strict steps helps with many common queries in the 
interpreted mode.

The code itself looks really good (great work!) but I have two comments 
on it.

1) I think the patch should be split into two. The two different 
optimizations are not related at all other than that they create 
specialized versions of expressions steps. Having them as separate makes 
the commit history easier to read for future developers.

2) We could generate functions which return void rather than NULL and 
therefore not have to do a return at all but I am not sure that small 
optimization and extra clarity would be worth the hassle. The current 
approach with adding Assert() is ok with me. Daniel, what do you think?

Andreas



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: datfrozenxid > relfrozenxid w/ crash before XLOG_HEAP_INPLACE
Next
From: Andreas Karlsson
Date:
Subject: Re: Special-case executor expression steps for common combinations