postgresql/src/common
Nathan Bossart 849110dd3e Optimize sifting down in binaryheap.
Presently, each iteration of the loop in sift_down() will perform
3 comparisons if both children are larger than the parent node (2
for comparing each child to the parent node, and a third to compare
the children to each other).  By first comparing the children to
each other and then comparing the larger child to the parent node,
we can accomplish the same thing with just 2 comparisons (while
also not affecting the number of comparisons in any other case).

Author: ChangAo Chen
Reviewed-by: Robert Haas
Discussion: https://postgr.es/m/tencent_0142D8DA90940B9930BCC08348BBD6D0BB07%40qq.com
2024-10-30 11:28:34 -05:00
..
unicode meson: Add missing dependency to unicode test programs 2024-10-30 08:30:00 +01:00
.gitignore Replace the data structure used for keyword lookup. 2019-01-06 17:02:57 -05:00
archive.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
base64.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
binaryheap.c Optimize sifting down in binaryheap. 2024-10-30 11:28:34 -05:00
blkreftable.c Fix incorrect calculation in BlockRefTableEntryGetBlocks. 2024-04-05 13:41:19 -04:00
checksum_helper.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
compression.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
config_info.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
controldata_utils.c Expose new function get_controlfile_by_exact_path(). 2024-03-13 12:06:44 -04:00
cryptohash.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
cryptohash_openssl.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
d2s.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
d2s_full_table.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
d2s_intrinsics.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
digit_table.h Change floating-point output format for improved performance. 2019-02-13 15:20:33 +00:00
encnames.c Simplify pg_enc2gettext_tbl[] with C99-designated initializer syntax 2024-03-01 18:03:48 +09:00
exec.c Remove support for old realpath() API 2024-08-12 08:04:35 +02:00
f2s.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
fe_memutils.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
file_perm.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
file_utils.c Define PG_TBLSPC_DIR for path pg_tblspc/ in data folder 2024-09-03 09:11:54 +09:00
hashfn.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
hmac.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
hmac_openssl.c Remove support for OpenSSL older than 1.1.0 2024-09-02 13:51:48 +02:00
ip.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
jsonapi.c jsonapi: fully initialize dummy lexer 2024-10-17 08:23:46 +02:00
keywords.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
kwlookup.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
link-canary.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
logging.c Fix memory leaks from incorrect strsep() uses 2024-10-18 11:29:20 +02:00
Makefile common/jsonapi: support libpq as a client 2024-09-11 09:01:07 +02:00
md5.c Make fallback MD5 implementation thread-safe on big-endian systems 2024-08-07 10:43:52 +03:00
md5_common.c Fix documentation comment for pg_md5_hash 2024-03-14 09:23:37 +01:00
md5_int.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build common/jsonapi: support libpq as a client 2024-09-11 09:01:07 +02:00
parse_manifest.c File size in a backup manifest should use uint64, not size_t. 2024-10-02 09:59:04 -04:00
percentrepl.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_get_line.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_lzcompress.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_prng.c Add functions to generate random numbers in a specified range. 2024-03-27 10:12:39 +00:00
pgfnames.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
psprintf.c Unify src/common/'s definitions of MaxAllocSize. 2024-10-28 14:39:01 -04:00
relpath.c Define PG_TBLSPC_DIR for path pg_tblspc/ in data folder 2024-09-03 09:11:54 +09:00
restricted_token.c Convert some extern variables to static, Windows code 2024-08-01 13:28:32 +02:00
rmtree.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
ryu_common.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
saslprep.c Unify src/common/'s definitions of MaxAllocSize. 2024-10-28 14:39:01 -04:00
scram-common.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
sha1.c Mark misc static global variables as const 2024-08-06 23:04:48 +03:00
sha1_int.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
sha2.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
sha2_int.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
sprompt.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
string.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
stringinfo.c Unify src/common/'s definitions of MaxAllocSize. 2024-10-28 14:39:01 -04:00
unicode_case.c Fix incorrect year in some copyright notices added this year 2024-05-15 15:01:21 +12:00
unicode_category.c Pre-beta mechanical code beautification. 2024-05-14 16:34:50 -04:00
unicode_norm.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
username.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
wait_error.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
wchar.c Inline basic UTF-8 functions. 2024-03-20 09:40:57 -07:00