Re: Making empty Bitmapsets always be NULL
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Yuya Watari <watari.yuya@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2023-07-02T21:27:25Z
Lists: pgsql-hackers
Attachments
- master_vs_v4_m2pro.png (image/png)
- master_vs_v4_3990x.png (image/png)
On Fri, 30 Jun 2023 at 14:11, Yuya Watari <watari.yuya@gmail.com> wrote: > I have tested these versions with installcheck. Since the planning > times obtained by installcheck vary each time, it is important to run > it repeatedly and examine its distribution. I ran installcheck 100 > times for each version. The following tables and the attached figure > show the results. From these results, we can conclude that the v4 > patch has no regression in the installcheck test. It seems to be > slightly (0.31-0.38%) faster than the master. The difference between > v4 and v4 with 0th word check is not so clear, but v4 may be faster. I did the same on the AMD 3990x machine and an Apple M2 Pro machine. On the M2 over the 100 runs v4 came out 1.18% faster and the 3990x was 1.25% faster than master. I've plotted the results in the attached graphs. Looking over the patch again, the only thing I'm tempted into changing is to add Asserts like: Assert(a == NULL || a->words[a->nword - 1] != 0) to each function just as extra reassurance that nothing accidentally leaves trailing empty words. If nobody else wants to take a look, then I plan to push the v4 + the asserts in the next day or so. David
Commits
-
Remove trailing zero words from Bitmapsets
- a8c09daa8bb1 17.0 landed
-
Remove local optimizations of empty Bitmapsets into null pointers.
- 6b661b01f48b 16.0 landed
-
Require empty Bitmapsets to be represented as NULL.
- 00b41463c216 16.0 landed
-
Mop up some undue familiarity with the innards of Bitmapsets.
- 141225b2518f 16.0 landed
-
Remove bms_first_member().
- 462bb7f12851 16.0 landed