Microoptimization of Bitmapset usage in postgres_fdw

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Microoptimization of Bitmapset usage in postgres_fdw
Date: 2018-05-29 15:40:18
Message-ID: C73594E0-2B67-4E10-BB35-CDE0E41CC384@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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 Content-Type Size
postgres_fdw_bms_multiple.patch application/octet-stream 1.7 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2018-05-29 15:49:40 Re: Add CONTRIBUTING.md
Previous Message Magnus Hagander 2018-05-29 15:38:43 Re: Add CONTRIBUTING.md