David Rowley <david.row...@2ndquadrant.com> writes: > On Mon, 22 Jul 2019 at 16:37, Tom Lane <t...@sss.pgh.pa.us> wrote: >> Interesting. I wonder if bms_next_member() could be made any quicker?
> I had a quick look earlier and the only thing I saw was maybe to do > the first loop differently from subsequent ones. The "w &= mask;" > does nothing useful once we're past the first bitmapword that the loop > touches. Good thought, but it would only help when we're actually iterating to later words, which happens just 1 out of 64 times in the fully- populated-bitmap case. Still, I think it might be worth pursuing to make the sparse-bitmap case faster. regards, tom lane