I've been reading this book "Javascript Enlightenment" by Cody Lindley. On page 82 he states: "Being explicit (e.g. window.alert() v.s. alert()) costs a little bit more with regards to performance. It's faster if you rely on the scope chain alone and avoid explicitly referencing the head object even if you know the property you want is contained in the global scope."
I am kind of curious why this is. I would think that it would be the opposite, because the Javascript interpreter could just skip checking the scope and find it directly. I just don't see how it is beneficial to not specify the exact address of something.
I mean, I know I am not going to want to type window.whatever() every time I want to use something contained in the global scope and I think it is great that it is faster to not specify. Just not sure why.
Just one of those "want to know" things.