It depends on what you do with your foo.bar.baz, and the complexity of your code.
While in principle var foobaZ should be quicker, in most cases it's going to be exactly the same, as the browser is going to be smart enough to optimize your code anyway. The key thing, is that this can only happen if you don't assign to Foo.Bar.Baz (which seems the case, otherwise you wouldn't be able to replace it with a local variable).
See it for yourself, the difference is minimal (the timing error is greater than the measured difference):