Microoptimization of Bitmapset usage in postgres_fdw - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Microoptimization of Bitmapset usage in postgres_fdw
Date
Msg-id C73594E0-2B67-4E10-BB35-CDE0E41CC384@yesql.se
Whole thread Raw
Responses Re: Microoptimization of Bitmapset usage in postgres_fdw
List pgsql-hackers
There are a couple of places in postgres_fdw where we check if the Bitmapset
has multiple members using bms_num_members(), without storing the returned
count.  The attached patch instead use bms_membership() which is optimized for
just that usecase, and (IMO) makes for clearer code.

cheers ./daniel


Attachment

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Add CONTRIBUTING.md
Next
From: Joe Conway
Date:
Subject: Re: Add CONTRIBUTING.md