pgsql: Speed up tail processing when hashing aligned C strings, take tw
В списке pgsql-committers по дате отправления:
| От | John Naylor |
|---|---|
| Тема | pgsql: Speed up tail processing when hashing aligned C strings, take tw |
| Дата | |
| Msg-id | E1rt36p-000nMe-Cc@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Speed up tail processing when hashing aligned C strings, take two After encountering the NUL terminator, the word-at-a-time loop exits and we must hash the remaining bytes. Previously we calculated the terminator's position and re-loaded the remaining bytes from the input string. This was slower than the unaligned case for very short strings. We already have all the data we need in a register, so let's just mask off the bytes we need and hash them immediately. In addition to endianness issues, the previous attempt upset valgrind in the way it computed the mask. Whether by accident or by wisdom, the author's proposed method passes locally with valgrind 3.22. Ants Aasma, with cosmetic adjustments by me Discussion: https://postgr.es/m/CANwKhkP7pCiW_5fAswLhs71-JKGEz1c1%2BPC0a_w1fwY4iGMqUA%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/a365d9e2e8c1ead27203a4431211098292777d3b Modified Files -------------- src/include/common/hashfn_unstable.h | 46 ++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 10 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера