Re: Proposal for enabling auto-vectorization for checksum calculations

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Oleg Tselebrovskiy <o(dot)tselebrovskiy(at)postgrespro(dot)ru>
Cc: Andrew Kim <tenistarkim(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Proposal for enabling auto-vectorization for checksum calculations
Date: 2026-01-15 10:35:36
Message-ID: CANWCAZZhyyieM9LSELXTuvh1qoAY0frmcEnSh9d4KzBbahQvRQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 15, 2026 at 3:04 PM Oleg Tselebrovskiy
<o(dot)tselebrovskiy(at)postgrespro(dot)ru> wrote:

> > So in v10 I separated the body of checksum_block to
> > a semi-private header to provide hardware-specific definitions
> > for core code, while also maintaining the same one that
> > external code expects
>
> I like the usage of a semi-internal header, less code duplication
> is always good

Glad to hear it.

> If I understand correctly, with how code is currently,
> external programms can define PG_CHECKSUM_INTERNAL manually,
> but then they won't have access to static functions inside of
> checksum.c, so all you get is a pointer that leads nowhere, correct?

Sounds right, but I'm not sure why an external program would define
it, because it's named...drumroll.."internal".

> I'd like to think that speeding up checksum calculation is something
> that some external programms could appreciate.

External programs are probably doing some one-off task, so I don't see
a reason to work harder.

> Also, not moving all those checksum files to src/port saves us from
> thinking about problems with meson and current external programs,
> but, I think, that after hardware checks are refactored, we could
> revisit the question of moving checksum[_impl].h/.c to src/port.

Refactoring the hardware checks is not going to make those two
problems go away, and I don't understand why you want to move anything
to begin with.

--
John Naylor
Amazon Web Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-01-15 10:47:51 Re: remove the unneeded header file math.h in binaryheap.c
Previous Message Dave Cramer 2026-01-15 10:33:11 Re: Proposal to allow setting cursor options on Portals