Re: Special-case executor expression steps for common combinations

2025-03-12 Thread Daniel Gustafsson
> On 9 Mar 2025, at 23:35, Daniel Gustafsson wrote: >> On 8 Mar 2025, at 17:15, Andreas Karlsson wrote: >> +1 Still seems like a nice change to me too. > > Thanks, I actually had it staged to go in early next week. ..which was done yesterday, thanks for review! -- Daniel Gustafsson

Re: Special-case executor expression steps for common combinations

2025-03-11 Thread Daniel Gustafsson
> On 8 Mar 2025, at 17:15, Andreas Karlsson wrote: > > On 2/5/25 11:00 AM, Daniel Gustafsson wrote: >> 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 wit

Re: Special-case executor expression steps for common combinations

2025-03-08 Thread Andreas Karlsson
On 2/5/25 11:00 AM, Daniel Gustafsson wrote: 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 expression

Re: Special-case executor expression steps for common combinations

2025-02-05 Thread Daniel Gustafsson
> On 13 Sep 2024, at 15:01, Andreas Karlsson wrote: > > On 9/10/24 10:54 AM, Daniel Gustafsson wrote: >>> On 22 Jul 2024, at 23:25, Andreas Karlsson wrote: >>> >>> I have bench marked the two patches now and failed to measure any speedup >>> or slowdown from the first patch (removing return) b

Re: Special-case executor expression steps for common combinations

2024-09-13 Thread Andreas Karlsson
On 9/10/24 10:54 AM, Daniel Gustafsson wrote: On 22 Jul 2024, at 23:25, Andreas Karlsson 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 st

Re: Special-case executor expression steps for common combinations

2024-09-10 Thread Daniel Gustafsson
> On 22 Jul 2024, at 23:25, Andreas Karlsson 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% s

Re: Special-case executor expression steps for common combinations

2024-07-22 Thread Andreas Karlsson
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;"

Re: Special-case executor expression steps for common combinations

2024-07-22 Thread Andreas Karlsson
On 7/4/24 6:26 PM, Daniel Gustafsson wrote: 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

Re: Special-case executor expression steps for common combinations

2024-07-04 Thread Daniel Gustafsson
> On 20 Jun 2024, at 17:22, Andreas Karlsson wrote: > > 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

Re: Special-case executor expression steps for common combinations

2024-06-20 Thread Andreas Karlsson
On 6/20/24 5:22 PM, Andreas Karlsson wrote: 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 nob

Re: Special-case executor expression steps for common combinations

2024-06-20 Thread Andreas Karlsson
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.

Re: Special-case executor expression steps for common combinations

2023-10-19 Thread Daniel Gustafsson
> On 12 Oct 2023, at 19:52, Andres Freund wrote: > On 2023-10-12 13:24:27 +0300, Heikki Linnakangas wrote: >> On 12/10/2023 12:48, Daniel Gustafsson wrote: >>> The attached patch adds special-case expression steps for common sets of >>> steps >>> in the executor to shave a few cycles off during

Re: Special-case executor expression steps for common combinations

2023-10-12 Thread Andres Freund
Hi, On 2023-10-12 13:24:27 +0300, Heikki Linnakangas wrote: > On 12/10/2023 12:48, Daniel Gustafsson wrote: > > The attached patch adds special-case expression steps for common sets of > > steps > > in the executor to shave a few cycles off during execution, and make the JIT > > generated code si

Re: Special-case executor expression steps for common combinations

2023-10-12 Thread David Rowley
On Thu, 12 Oct 2023 at 22:54, Daniel Gustafsson wrote: > EEOP_FUNCEXPR_STRICT_* (10M iterations): > master : (7503.317, 7553.691, 7634.524) > patched : (7422.756, 7455.120, 7492.393) > > pgbench: > master : (3653.83, 3792.97, 3863.70) > patched : (3743.04, 3830.02, 3869.80) > > T

Re: Special-case executor expression steps for common combinations

2023-10-12 Thread Heikki Linnakangas
On 12/10/2023 12:48, Daniel Gustafsson wrote: The attached patch adds special-case expression steps for common sets of steps in the executor to shave a few cycles off during execution, and make the JIT generated code simpler. * Adds EEOP_FUNCEXPR_STRICT_1 and EEOP_FUNCEXPR_STRICT_2 for function