Re: Review/Pull Request: Adding new CRC32C implementation for IBM S390X - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Review/Pull Request: Adding new CRC32C implementation for IBM S390X
Date
Msg-id 84824.1746657344@sss.pgh.pa.us
Whole thread Raw
In response to Re: Review/Pull Request: Adding new CRC32C implementation for IBM S390X  (John Naylor <johncnaylorls@gmail.com>)
List pgsql-hackers
John Naylor <johncnaylorls@gmail.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



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Review/Pull Request: Adding new CRC32C implementation for IBM S390X
Next
From: Álvaro Herrera
Date:
Subject: Re: [PATCH] Fix missing comma in Requires.private with a Make macro