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.
Some comments now look a bit too obvious to keep around, but maybe
they should be replaced with a "why", instead of a "what":
/* rotate hashkey left 1 bit at each step */
- hashkey = (hashkey << 1) | ((hashkey &
0x80000000) ? 1 : 0);
+ hashkey = pg_rotate_left32(hashkey, 1);
--
John Naylor
EDB: http://www.enterprisedb.com