Microoptimization of Bitmapset usage in postgres_fdw
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Postgres hackers <pgsql-hackers@postgresql.org>
Date: 2018-05-29T15:40:18Z
Lists: pgsql-hackers
Attachments
- postgres_fdw_bms_multiple.patch (application/octet-stream) patch
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
Commits
-
Use optimized bitmap set function for membership test in postgres_fdw
- 65782346a481 12.0 landed