Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck. |
| Дата | |
| Msg-id | 1551.1506981471@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck. (Andres Freund <andres@anarazel.de>) |
| Ответы |
Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.
|
| Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes:
> Done that way. It's a bit annoying, because we've to take care to
> initialize the "unused" part of the array with a valid signalling it's
> an unused mapping. Can't use 0 for that because fmgr_builtins[0] is a
> valid entry.
The prototype code I posted further upthread just used -1 as the "unused"
marker. There's no reason the array can't be int16 rather than uint16,
and "if (index < 0)" is probably a faster test anyway.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера