This is my first post here.
I know that the question may seem vague, I will try to be clear ...
globally without targeting any interpreted language (well, I am using C # at the moment, but I think the answer should work for others too ...)
I wonder if this type of call makes:
Afunction(var1,var2,AnotherFunction(var3,var2,AthirdFunction(Avector.z)),Mathf.RoundToInt(Avector.x));
Will work faster than:
Type var1 = avalue; Type var2 = avalue; Type var3 = avalue; Type var4 = AthirdFunction(Avector.z); Type var5 = Mathf.RoundToInt(Avector.x); Type var6 = AnotherFunction(var3,var2,var4); Afunction(var1,var2,var6,var5);
I know that the second method is easier to read, but it works faster, knowing that I will probably call this function broadly (say, in a graphical application, every frame). And as for memory usage, is it better to create more variables to destroy them immediately after using the function or directly encode everything inside the "Affinal" by declaring as few variables as possible ...
(and for understanding: Afunction(), AnotherFunction() and AthirdFunction() already declared elsewhere)
I hope this question does not go beyond the rules of using the forum ...