On Mon, Jan 13, 2025 at 03:48:49PM +0000, chiranmoy.bhattacha...@fujitsu.com wrote: > There is a 30% improvement using auto-vectorization.
It might be worth enabling auto-vectorization independently of any patches that use intrinsics, then. > Currently, it is assumed that all aarch64 machine support NEON, but for > newer advanced SIMD like SVE (and AVX512 for x86) this assumption may not > hold. We need a runtime check to be sure.. Using src/include/port/simd.h > to abstract away these advanced SIMD implementations may be difficult. Yeah, moving simd.h to anything beyond Neon/SSE2 might be tricky at the moment. Besides the need for additional runtime checks, using wider registers can mean that you need more data before an optimization takes effect, which is effectively a regression. I ran into this when I tried to add AVX2 support to simd.h [0]. My question about using simd.h was ultimately about abstracting the relevant Neon/SSE2 instructions and using those for hex_encode/decode(). If that's possible, I think it'd be interesting to see how that compares to the SVE version. [0] https://postgr.es/m/20231129171526.GA857928%40nathanxps13 -- nathan