Inline CRC computation for small fixed-length input on x86 pg_crc32c.h now has a simplified copy of the loop in pg_crc32c_sse42.c suitable for inlining where possible.
This may slightly reduce contention for the WAL insertion lock, but that hasn't been tested. The motivation for this change is avoid regressing for a future commit that will use a function pointer for non-constant input in all x86 builds. While it's technically possible to make a similar change for Arm and LoongArch, there are some questions about how inlining should work since those platforms prefer stricter alignment. There are also no immediate plans to add additional implementations for them. Reviewed-by: Nathan Bossart <nathandboss...@gmail.com> Reviewed-by: Raghuveer Devulapalli <raghuveer.devulapa...@intel.com> Discussion: https://postgr.es/m/CANWCAZZEiTzhZcuwTiJ2=opinpaun1vudru1n02z61athwr...@mail.gmail.com Discussion: https://postgr.es/m/canwcazyrhlharpyfv4urk-rw9n5ov5hmkkktbehcutjnomw...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e2809e3a1015697832ee4d37b75ba1cd0caac0f0 Modified Files -------------- src/include/port/pg_crc32c.h | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-)