From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Greg Burd <greg(at)burd(dot)me>, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Add tests for Bitmapset |
Date: | 2025-10-09 02:12:50 |
Message-ID: | aOcaIr8QKMvbIlnA@paquier.xyz |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 09, 2025 at 02:57:41PM +1300, David Rowley wrote:
> I don't think there's any need to maintain the order of that members
> array, so couldn't you just do this?:
>
> bms = bms_del_member(bms, member);
> members[pos] = members[--num_members];
Yep, I was just playing with all that and moving the last element to
the member we know is gone would be cheaper. I have also added more
comments to document everything in a more precise way, while going
through.
I also do not see a point in preventing inserts in the second set at
the beginning of the function. This forces bms_union() to do more
operations with overlapping sets.
What do you think about the attached?
--
Michael
Attachment | Content-Type | Size |
---|---|---|
v2-0001-test_bitmapset-Improve-random-function.patch | text/x-diff | 3.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-10-09 02:13:28 | Re: Eager aggregation, take 3 |
Previous Message | Andres Freund | 2025-10-09 02:09:54 | Re: ReadRecentBuffer() doesn't scale well |