Re: nbtree: Cache operator family OID in _bt_setup_array_cmp - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: nbtree: Cache operator family OID in _bt_setup_array_cmp
Date
Msg-id CAH2-WzkcsHx7mh5FYzXSwNNg3vv0GcFX5+rCfkaxuh2CNSTuug@mail.gmail.com
Whole thread Raw
In response to Re: nbtree: Cache operator family OID in _bt_setup_array_cmp  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
On Wed, Jan 7, 2026 at 9:45 AM Peter Eisentraut <peter@eisentraut.org> wrote:
> Are you claiming that this has a performance impact, or that it makes
> the code easier to understand, or something else?  The patch isn't
> necessarily wrong, but a clear description of the motivation would be good.

I've noticed that making a local copy of a variable can sometimes help
in tight inner loops, by avoiding an aliasing issue. But it is only
something I've seen help in extreme, rare cases.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: "Matheus Alcantara"
Date:
Subject: Re: Import Statistics in postgres_fdw before resorting to sampling.
Next
From: Fujii Masao
Date:
Subject: Re: Remove deprecated role membership options from psql help for CREATE USER/GROUP