Would using variables that are used every frame be more efficient if they are declared once globally or is declaring them every frame acceptable?
For example we use a Vector3 for some calculations every frame.
Case 1-
Vector3 vector;
void Update()
{
vector = //Some Calculation
}
Case 2-
void Update()
{
Vector3 vector = //Some Calculation
}
Case 2 is undeniably cleaner and preferable but with publishing to mobile in mind would declaring a number of variables each frame have a noticeable impact on performance?
Thanks in advance