postgresql/src/include/common
John Naylor a365d9e2e8 Speed up tail processing when hashing aligned C strings, take two
After encountering the NUL terminator, the word-at-a-time loop exits
and we must hash the remaining bytes. Previously we calculated
the terminator's position and re-loaded the remaining bytes from
the input string. This was slower than the unaligned case for very
short strings. We already have all the data we need in a register,
so let's just mask off the bytes we need and hash them immediately.

In addition to endianness issues, the previous attempt upset valgrind
in the way it computed the mask. Whether by accident or by wisdom,
the author's proposed method passes locally with valgrind 3.22.

Ants Aasma, with cosmetic adjustments by me

Discussion: https://postgr.es/m/CANwKhkP7pCiW_5fAswLhs71-JKGEz1c1%2BPC0a_w1fwY4iGMqUA%40mail.gmail.com
2024-04-06 17:14:28 +07:00
..
archive.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
base64.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
blkreftable.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
checksum_helper.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
compression.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
config_info.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
connect.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
controldata_utils.h Expose new function get_controlfile_by_exact_path(). 2024-03-13 12:06:44 -04:00
cryptohash.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
fe_memutils.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
file_perm.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
file_utils.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
hashfn.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
hashfn_unstable.h Speed up tail processing when hashing aligned C strings, take two 2024-04-06 17:14:28 +07:00
hmac.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
int.h Introduce overflow-safe integer comparison functions. 2024-02-16 13:37:02 -06:00
int128.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
ip.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
jsonapi.h Introduce a non-recursive JSON parser 2024-04-04 06:46:40 -04:00
keywords.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
kwlookup.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
link-canary.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
logging.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
md5.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
openssl.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
parse_manifest.h Add support for incrementally parsing backup manifests 2024-04-04 06:46:40 -04:00
percentrepl.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_lzcompress.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pg_prng.h Add functions to generate random numbers in a specified range. 2024-03-27 10:12:39 +00:00
relpath.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
restricted_token.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
saslprep.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
scram-common.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
sha1.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
sha2.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
shortest_dec.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
string.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
unicode_case.h Add unicode_strtitle() for Unicode Default Case Conversion. 2024-03-29 17:35:07 -07:00
unicode_case_table.h Unicode case mapping tables and functions. 2024-03-07 11:15:06 -08:00
unicode_category.h Add Unicode property tables. 2024-03-06 12:50:01 -08:00
unicode_category_table.h Add Unicode property tables. 2024-03-06 12:50:01 -08:00
unicode_east_asian_fw_table.h Update Unicode data to Unicode 15.1.0 2023-09-18 07:26:34 +02:00
unicode_nonspacing_table.h Update Unicode data to Unicode 15.0.0 2022-09-19 18:30:05 -04:00
unicode_norm.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
unicode_norm_hashfunc.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
unicode_norm_table.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
unicode_normprops_table.h Update Unicode data to Unicode 15.0.0 2022-09-19 18:30:05 -04:00
unicode_version.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
username.h Update copyright for 2024 2024-01-03 20:49:05 -05:00