Re: Make tuple deformation faster

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Make tuple deformation faster
Date: 2025-03-05 12:07:21
Message-ID: CAApHDvq5ygT12jyfpj_JuSZ8T9-QtE9LhCsC51mELbbs__uVfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 5 Mar 2025 at 08:48, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> I happened to run into the code and was surprised to see a strongly-
> worded comment about the size of CompactAttribute, but then also see
> independent booleans rather than flags or bitfields.
>
> Did the discussion end here, or was there some kind of conclusion? Is
> it worth adding a comment about why we use independent booleans, even
> if we don't have a complete answer?

I must have either forgotten to try that, or I tried it and wrote it
off and forgot to document it.

Anyway, I've now benchmarked using bitfields on the same 3 machines
that I used last time. There are certainly some cases where it's
faster with the bitfields, but it's mainly slower.

I've attached the results. The 3990x with clang looks good, but the
rest are mostly slower.

David

Attachment Content-Type Size
deform_test.sh.txt text/plain 1.1 KB
shrink_CompactAttribute.patch application/x-patch 1.3 KB
bitfields_gcc.png image/png 169.7 KB
bitfields_clang.png image/png 229.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-03-05 12:19:16 Re: Add regression test checking combinations of (object,backend_type,context) in pg_stat_io
Previous Message Bertrand Drouvot 2025-03-05 12:05:16 Re: Add contrib/pg_logicalsnapinspect