Re: Review/Pull Request: Adding new CRC32C implementation for IBM S390X

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: Eduard Stefes <Eduard(dot)Stefes(at)ibm(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "iii(at)linux(dot)ibm(dot)com" <iii(at)linux(dot)ibm(dot)com>, "rueckner(at)linux(dot)ibm(dot)com" <rueckner(at)linux(dot)ibm(dot)com>
Subject: Re: Review/Pull Request: Adding new CRC32C implementation for IBM S390X
Date: 2025-05-07 22:35:44
Message-ID: 84824.1746657344@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

John Naylor <johncnaylorls(at)gmail(dot)com> writes:
> We prefer that 'a' and 'b' are declared as global variables, just to
> make it as realistic as possible, although it doesn't seem to make
> much difference when I tried it on Compiler Explorer. (Same for
> autoconf)

Yeah, see commit fdb5dd6331e305f797bb589747f056062c305f0b for
some recent precedent, and for explanation of why we think it's
worth worrying about. It's not so much that "global" matters,
it's that we don't want the compiler to have the option to
fold the whole test to a constant, which it would be within
its rights to do as you have this.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-05-07 22:39:02 Re: [PATCH] Fix missing comma in Requires.private with a Make macro
Previous Message John Naylor 2025-05-07 22:32:37 Re: Review/Pull Request: Adding new CRC32C implementation for IBM S390X