Static method performance vs non static
Hello everybody! I've created a Polynome class which holds some methods in it, like the one calculating the answer for a given x.
Some MonoBehaviour scripts in my game instatiate that Polynome class, and calculate the polynomial equation every frame with a changing variable to make nice movements. The question is: Should I make the Calculate Method Static? I didn't do so for now because the method have full access on the class data, but I could easily pass it using parameters of the Static Method. Do we get more performance using a Static method? If I have 80 gameObjects with polynomes, do it means that I have 80 copy of that Calculate same Method?
Your answer
Follow this Question
Related Questions
Structure Support System like fortnite 0 Answers
Generic arrays? 1 Answer
Looking for an efficient way to use Raycast for many objects in a scene 0 Answers
Should I pool a non-monobehaviour class? 1 Answer
reference to monobehaviour in static script,declaring a static class/script in a monobehaviour 0 Answers