aboutsummaryrefslogtreecommitdiff
path: root/src/backend/lib/dshash.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-12-14 13:35:22 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-12-14 13:35:22 -0500
commita2ff18e89ff8f29677084bffd1e3de9ca6cd7224 (patch)
tree0aed672d8006e3427abf0ea204a854836c057a4c /src/backend/lib/dshash.c
parent2de3c1015cb2556af501c630b1768a20f111fe95 (diff)
downloadpostgresql-a2ff18e89ff8f29677084bffd1e3de9ca6cd7224.tar.gz
postgresql-a2ff18e89ff8f29677084bffd1e3de9ca6cd7224.zip
Improve sift up/down code in binaryheap.c and logtape.c.
Borrow the logic that's long been used in tuplesort.c: instead of physically swapping the data in two heap entries, keep the value that's being sifted up or down in a local variable, and just move the other values as necessary. This makes the code shorter as well as faster. It's not clear that any current callers are really time-critical enough to notice, but we might as well code heap maintenance the same way everywhere. Ma Liangzhu and Tom Lane Discussion: https://postgr.es/m/17336-fc4e522d26a750fd@postgresql.org
Diffstat (limited to 'src/backend/lib/dshash.c')
0 files changed, 0 insertions, 0 deletions