pgsql: Use static inline functions for float <-> Datum conversions.
В списке pgsql-committers по дате отправления:
| От | Heikki Linnakangas |
|---|---|
| Тема | pgsql: Use static inline functions for float <-> Datum conversions. |
| Дата | |
| Msg-id | E1bf5B4-0003vG-0N@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Use static inline functions for float <-> Datum conversions. Now that we are OK with using static inline functions, we can use them to avoid function call overhead of pass-by-val versions of Float4GetDatum, DatumGetFloat8, and Float8GetDatum. Those functions are only a few CPU instructions long, but they could not be written into macros previously, because we need a local union variable for the conversion. I kept the pass-by-ref versions as regular functions. They are very simple too, but they call palloc() anyway, so shaving a few instructions from the function call doesn't seem so important there. Discussion: <dbb82a4a-2c15-ba27-dd0a-009d2aa72b77@iki.fi> Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/14cca1bf8e31ed39dbc26dd6c610f1113e759972 Modified Files -------------- src/backend/utils/fmgr/fmgr.c | 63 +++++-------------------------------------- src/include/postgres.h | 63 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 67 insertions(+), 59 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера