Re: Reduce build times of pg_trgm GIN indexes

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: David Geier <geidav(dot)pg(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reduce build times of pg_trgm GIN indexes
Date: 2026-04-08 02:15:38
Message-ID: CANWCAZa-AUG=aK7UGGa+NY0sZ2o09Ko=z_N-irkC7Ura_c3uJg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 7, 2026 at 6:27 PM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> But the comments on the pg_cmp functions say:
>
> > * NB: If the comparator function is inlined, some compilers may produce
> > * worse code with these helper functions than with code with the
> > * following form:
> > *
> > * if (a < b)
> > * return -1;
> > * if (a > b)
> > * return 1;
> > * return 0;
> > *
>
> So, uh, is that really a universal improvement? Is that comment about
> producing worse code outdated?

No, it's quite recent:

https://www.postgresql.org/message-id/20240212230423.GA3519%40nathanxps13

--
John Naylor
Amazon Web Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-04-08 02:17:30 Re: Remove commented-out code in 026_overwrite_contrecord.pl
Previous Message Chao Li 2026-04-08 02:09:51 Re: updates for handling optional argument in system functions