Avoid is possible a expensive function call (src/backend/utils/adt/varlena.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Avoid is possible a expensive function call (src/backend/utils/adt/varlena.c)
Дата
Msg-id CAEudQAqL1x5GWXoRbHvAfqghNrVgVaeDX809p1X9p5RHchYfwA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Avoid is possible a expensive function call (src/backend/utils/adt/varlena.c)  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Список pgsql-hackers
Hi,

The function var_strcmp is a critical function.
Inside the function, there is a shortcut condition,
which allows for a quick exit.

Unfortunately, the current code calls a very expensive function beforehand, which if the test was true, all the call time is wasted.
So, IMO, it's better to postpone the function call until when it is actually necessary.

best regards,
Ranier Vilela
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgsql: Improve performance of subsystems on top of SLRU
Следующее
От: Matthias van de Meent
Дата:
Сообщение: Re: Avoid is possible a expensive function call (src/backend/utils/adt/varlena.c)