Re: JIT compilation per plan node - Mailing list pgsql-hackers

From Tom Lane
Subject Re: JIT compilation per plan node
Date
Msg-id 115617.1708407115@sss.pgh.pa.us
Whole thread Raw
In response to Re: JIT compilation per plan node  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: JIT compilation per plan node
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> On Tue, 20 Feb 2024 at 05:26, Tomas Vondra
> <tomas.vondra@enterprisedb.com> wrote:
>> Wouldn't it be simpler to just build the plan as we do now, and then
>> have an expression_tree_walker that walks the complete plan top-down,
>> inspects the nodes, enables JIT where appropriate and so on? That can
>> have arbitrary context, no problem with that.

> Why walk the entire plan tree again to do something we could do when
> building it in the first place?

FWIW, I seriously doubt that an extra walk of the plan tree is even
measurable compared to the number of cycles JIT compilation will
expend if it's called.  So I don't buy your argument here.
We would be better off to do this in a way that's clean and doesn't
add overhead for non-JIT-enabled builds.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: JIT compilation per plan node
Next
From: Michael Paquier
Date:
Subject: Re: Fix race condition in InvalidatePossiblyObsoleteSlot()