Re: use rotate macro in more places

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: use rotate macro in more places
Date: 2022-02-19 16:28:02
Message-ID: 58191.1645288082@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

John Naylor <john(dot)naylor(at)enterprisedb(dot)com> writes:
> We've accumulated a few bit-twiddling hacks to get the compiler to
> emit a rotate instruction. Since we have a macro for that, let's use
> it, as in the attached. I thought the new call sites would look better
> with a "left" version, so I added a new macro for that. That's not
> necessary, however.

+1 --- I didn't look to see if you missed any spots, but this is
good as far as it goes.

> Some comments now look a bit too obvious to keep around, but maybe
> they should be replaced with a "why", instead of a "what":

Yeah. Maybe like "combine successive hashkeys by rotating"?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-02-19 16:37:43 Re: Design of pg_stat_subscription_workers vs pgstats
Previous Message Andres Freund 2022-02-19 16:22:29 Re: Time to drop plpython2?