Hi Are class methods generally measured to be faster than instance methods since it doesn’t require loading an instance? If so, should we use class methods when possible?
Thanks
Hi Are class methods generally measured to be faster than instance methods since it
Share
I don’t know about generally, but I remember measuring for some application some time ago, and static methods were indeed faster.
From a design standpoint I would argue that any method than can sensibly be static (meaning without explicitly passing an instance as parameter or something like that), should be.