Обсуждение: pgsql: Add optimized functions for linear search within byte arrays
Add optimized functions for linear search within byte arrays In similar vein to b6ef167564, add pg_lfind8() and pg_lfind8_le() to search for bytes equal or less-than-or-equal to a given byte, respectively. To abstract away platform details, add helper functions and typedefs to simd.h. John Naylor and Nathan Bossart, per suggestion from Andres Freund Discussion: https://www.postgresql.org/message-id/CAFBsxsGzaaGLF%3DNuq61iRXTyspbO9rOjhSqFN%3DV6ozzmta5mXg%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e813e0e16852c080259cd0813e1a82ecb2625aea Modified Files -------------- src/include/port/pg_lfind.h | 68 ++++++++- src/include/port/simd.h | 168 ++++++++++++++++++++- .../modules/test_lfind/expected/test_lfind.out | 18 ++- src/test/modules/test_lfind/sql/test_lfind.sql | 4 +- src/test/modules/test_lfind/test_lfind--1.0.sql | 10 +- src/test/modules/test_lfind/test_lfind.c | 100 +++++++++++- 6 files changed, 358 insertions(+), 10 deletions(-)