On Sun, Oct 06, 2024 at 04:59:56PM -0300, Gustavo Rios wrote: > Hi folks! > > Does it improve code performance declaring function variables static ?
It depends on many factors if it will speedup things, it might even cause slowdowns. It can also introduce bugs because your function is no longer thread safe and recursive calls will likely break. Knowing what the function is doing, how it is called is neccesary and even then it doesn't matter most of the time. -Otto