public inbox for [email protected]  
help / color / mirror / Atom feed
From: Matheus Alcantara <[email protected]>
To: Pierre Ducroquet <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: Re: LLVMJIT: introduce force-inlined functions
Date: Mon, 23 Mar 2026 18:03:35 -0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <0ZWNQh_SmV9oIbQW9PIXIfsTPKp6-7glTtLq-jntPv9orZTvG-XTTnvDkyrB86TqEWbNCmDqJU-MIZX3QbyuWtALC7mhZGPjMrCg1pxoyYk=@pinaraf.info>
References: <0ZWNQh_SmV9oIbQW9PIXIfsTPKp6-7glTtLq-jntPv9orZTvG-XTTnvDkyrB86TqEWbNCmDqJU-MIZX3QbyuWtALC7mhZGPjMrCg1pxoyYk=@pinaraf.info>

Hi, I just found this thread when searching another thread, thanks for
working on this!

On Mon Jan 26, 2026 at 2:23 PM -03, Pierre Ducroquet wrote:
> Hi
>
> A bunch of functions are the most used in queries. The llvmjit
> inlining system (tries to) get rid of the overhead of calling any
> function, but this is triggered only when the cost is above
> jit_inline_above_cost. There is thus a nice performance boost to have
> by choosing to "manually" inline a few specific PostgreSQL functions.
> In this first patch, I've chosen to inline int4eq, int8eq and most
> date comparison functions. They are definitely small, the generated
> code is not bigger when inlining them (surprisingly, on amd64 the code
> is even smaller) and are unlikely to ever change so there won't be any
> maintenance burden here. On my AMD 3900XT system, this gives me a 3 to
> 5% performance improvement when running 1M dateeq calls. I will likely
> submit a second patch version later with more functions implemented,
> but I thought this was an interesting first result worth discussing
> already.
>

This seems interesting. Do you have the planning time comparison with
and without this patch? Wondering if it increase with this inline pass.

Do you still intend to send a v2 of this patch? The current set of
functions is a good starting point IMHO, what others do you have in
mind?

(a pgindent is welcome for easier review)

--
Matheus Alcantara
EDB: https://www.enterprisedb.com





view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: LLVMJIT: introduce force-inlined functions
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox