agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Exit early from pg_comp_crc32c_pmull for small inputs
Date: Wed, 08 Apr 2026 06:52:47 +0000
Message-ID: <E1wAMmM-003Vp8-2O@gemulon.postgresql.org> (raw)

Exit early from pg_comp_crc32c_pmull for small inputs

The vectorized path in commit fbc57f2bc had a side effect of putting
more branches in the path taken for small inputs. To reduce risk
of regressions, only proceed with the vectorized path if we can
guarantee that the remaining input after the alignment preamble is
greater than 64 bytes. That also allows removing length checks in
the alignment preamble.

Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://postgr.es/m/CANWCAZZ48GuLYhJCcTy8TXysjrMVJL6n1n7NP94=iG+t80YKPw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/948ef7cdc499b5226784a45ef1187ff554bf692a

Modified Files
--------------
src/port/pg_crc32c_armv8.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)



Message-ID: <E1wAMmM-003Vp8-2O@gemulon.postgresql.org>
Permalink:  ../E1wAMmM-003Vp8-2O@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wAMmM-003Vp8-2O@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: john.naylor@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Exit early from pg_comp_crc32c_pmull for small inputs
  In-Reply-To: <E1wAMmM-003Vp8-2O@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox