> On Aug 21, 2025, at 08:11, Michael Paquier <[email protected]> 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/




Reply via email to