| От | Nathan Bossart |
|---|---|
| Тема | pgsql: Inline pg_popcount() for small buffers. |
| Дата | |
| Msg-id | E1rs4LU-000Kcm-DM@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/deb1486c7d36e5430b50b63e8c0f2d8405e24a2a Modified Files -------------- src/include/port/pg_bitutils.h | 38 ++++++++++++++++++++++++++++++++++++-- src/port/pg_bitutils.c | 12 ++++++------ 2 files changed, 42 insertions(+), 8 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера