]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Exit early from pg_comp_crc32c_pmull for small inputs
authorJohn Naylor <john.naylor@postgresql.org>
Wed, 8 Apr 2026 06:52:14 +0000 (13:52 +0700)
committerJohn Naylor <john.naylor@postgresql.org>
Wed, 8 Apr 2026 06:52:14 +0000 (13:52 +0700)
commit948ef7cdc499b5226784a45ef1187ff554bf692a
tree1d3098d202f3ed26b1c36d7e1089d21326785f69
parentce11e63f812f987a9d6256b81cd4af91921a5a39
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
src/port/pg_crc32c_armv8.c