Auto-vectorize the varbit bitwise operators. Compile varbit.c with -ftree-vectorize where available, and adjust the loops in bit_and(), bit_or(), bitxor(), and bitnot() so that they are amenable to being auto-vectorized. (Mainly, that involves reading the byte count into a local variable before the loop. As written, the bound is recomputed from the varlena header on every iteration, because the compiler must assume that the loop might modify the header.)
Reviewed-by: Heikki Linnakangas <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/aphxrw6NkYkLMtZN%40nathan Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/9a40e39b1e8780ba75e014cb87860249c405c37e Modified Files -------------- src/backend/utils/adt/Makefile | 3 ++- src/backend/utils/adt/meson.build | 9 ++++----- src/backend/utils/adt/varbit.c | 26 +++++++++++++++++--------- 3 files changed, 23 insertions(+), 15 deletions(-)
