pgsql: Add bms_get_singleton_member(), and use it where appropriate.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add bms_get_singleton_member(), and use it where appropriate.
Date: 2014-11-28 19:16:29
Message-ID: E1XuR1p-0003fj-Tt@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add bms_get_singleton_member(), and use it where appropriate.

This patch adds a function that replaces a bms_membership() test followed
by a bms_singleton_member() call, performing both the test and the
extraction of a singleton set's member in one scan of the bitmapset.
The performance advantage over the old way is probably minimal in current
usage, but it seems worthwhile on notational grounds anyway.

David Rowley

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d25367ec4f869aac80e97964fa5d7143536818b1

Modified Files
--------------
src/backend/nodes/bitmapset.c | 44 +++++++++++++++++++++++++++++
src/backend/optimizer/path/equivclass.c | 3 +-
src/backend/optimizer/plan/analyzejoins.c | 7 +++--
src/backend/optimizer/util/placeholder.c | 4 +--
src/include/nodes/bitmapset.h | 1 +
5 files changed, 52 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2014-11-28 21:07:39 pgsql: Update transaction README for persistent multixacts
Previous Message Tom Lane 2014-11-28 18:37:32 pgsql: Add bms_next_member(), and use it where appropriate.