Add bms_next_member(), and use it where appropriate.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f4e031c662a6b600b786c4849968a099c58fcce7
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2014-11-28T18:37:25Z
Releases: 9.5.0
Add bms_next_member(), and use it where appropriate.

This patch adds a way of iterating through the members of a bitmapset
nondestructively, unlike the old way with bms_first_member().  While
bms_next_member() is very slightly slower than bms_first_member()
(at least for typical-size bitmapsets), eliminating the need to palloc
and pfree a temporary copy of the target bitmapset is a significant win.
So this method should be preferred in all cases where a temporary copy
would be necessary.

Tom Lane, with suggestions from Dean Rasheed and David Rowley

Files