mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-20 22:33:23 +02:00
This replaces the existing binary search with two perfect hash functions for the composition and the decomposition in the backend code, at the cost of slightly-larger binaries there (35kB in libpgcommon_srv.a). Per the measurements done, this improves the speed of the recomposition and decomposition by up to 30~40 times for the NFC and NFKC conversions, while all other operations get at least 40% faster. This is not as "good" as what libicu has, but it closes the gap a lot as per the feedback from Daniel Verite. The decomposition table remains the same, getting used for the binary search in the frontend code, where we care more about the size of the libraries like libpq over performance as this gets involved only in code paths related to the SCRAM authentication. In consequence, note that the perfect hash function for the recomposition needs to use a new inverse lookup array back to to the existing decomposition table. The size of all frontend deliverables remains unchanged, even with --enable-debug, including libpq. Author: John Naylor Reviewed-by: Michael Paquier, Tom Lane Discussion: https://postgr.es/m/CAFBsxsHUuMFCt6-pU+oG-F1==CmEp8wR+O+bRouXWu6i8kXuqA@mail.gmail.com |
||
---|---|---|
.. | ||
unicode | ||
.gitignore | ||
archive.c | ||
base64.c | ||
checksum_helper.c | ||
config_info.c | ||
controldata_utils.c | ||
d2s_full_table.h | ||
d2s_intrinsics.h | ||
d2s.c | ||
digit_table.h | ||
encnames.c | ||
exec.c | ||
f2s.c | ||
fe_memutils.c | ||
file_perm.c | ||
file_utils.c | ||
hashfn.c | ||
ip.c | ||
jsonapi.c | ||
keywords.c | ||
kwlookup.c | ||
link-canary.c | ||
logging.c | ||
Makefile | ||
md5.c | ||
pg_get_line.c | ||
pg_lzcompress.c | ||
pgfnames.c | ||
protocol_openssl.c | ||
psprintf.c | ||
relpath.c | ||
restricted_token.c | ||
rmtree.c | ||
ryu_common.h | ||
saslprep.c | ||
scram-common.c | ||
sha2_openssl.c | ||
sha2.c | ||
sprompt.c | ||
string.c | ||
stringinfo.c | ||
unicode_norm.c | ||
username.c | ||
wait_error.c | ||
wchar.c |