aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2024-04-03 12:22:02 -0500
committerNathan Bossart <nathan@postgresql.org>2024-04-03 12:22:02 -0500
commitdeb1486c7d36e5430b50b63e8c0f2d8405e24a2a (patch)
tree2c573b3c3d08c7a01e7ed0c5c8bca2757a3bd456 /doc/src
parent6dbb490261a6170a3fc3e326c6983ad63e795047 (diff)
downloadpostgresql-deb1486c7d36e5430b50b63e8c0f2d8405e24a2a.tar.gz
postgresql-deb1486c7d36e5430b50b63e8c0f2d8405e24a2a.zip
Inline pg_popcount() for small buffers.
If there aren't many bytes to process, the function call overhead of the optimized implementation isn't worth taking, so instead we inline a loop that consults pg_number_of_ones in that case. If there are many bytes to process, we accept the function call overhead because the optimized versions are likely to be faster. The threshold at which we use the optimized implementation is set to the smallest amount of data required to use special popcount instructions. Reviewed-by: Alvaro Herrera, Tom Lane Discussion: https://postgr.es/m/20240402155301.GA2750455%40nathanxps13
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions