myTransform vs. transform

I’m brand new to unity, so this is probably a really dumb question, but what’s the difference between myTransform and just transform?

For example, if I used “myTransform.Translate” and “transform.Translate”, what would be the difference?

Thank you!

transform implicitely call GetComponent<Transform>(), and thus, it is less performant than myTransform supposing you initialize myTransform in the Awake/Start method

Bad :

void Update
{
    transform.Translate( Vector3.up ) ;
}

Good :

private Transform myTransform ;
void Awake()
{
    myTransform = GetComponent<Transform>();
}

void Update()
{
    myTransform.Translate( Vector3.up ) ;
}

The same “rule” applies for rigidbody, collider, light, camera, …