Re: Remove redundant assignment of a variable in function AlterPublicationTables

Поиск
Список
Период
Сортировка
От Chao Li
Тема Re: Remove redundant assignment of a variable in function AlterPublicationTables
Дата
Msg-id B65DC4FA-312B-4B8C-AB61-55BCA989699E@gmail.com
обсуждение исходный текст
Ответ на Re: Remove redundant assignment of a variable in function AlterPublicationTables  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers


On Aug 21, 2025, at 08:11, Michael Paquier <michael@paquier.xyz> wrote:

Compilers are smart enough to optimize such things away

My first impression was compilers would optimize the local variable “isnull", such as replacing it with a constant value. However, “isnull” will be passed into other functions with its pointer, in this specific case, compilers won’t be able to do much optimization on “isnull”. It still needs to allocate “isnull” on stack and assign “true” to it at runtime. But anyway, that’s a tiny cost that we don’t need to worry about.

--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/




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