title: Why are local variables accessed faster than global variables in lua?
body: <p>So I was reading <em>Programing in Lua 2nd Ed</em> and I came across this paragraph here:</p>
  
  <blockquote>
    <p>It is good programming style to use local variables whenever
    possible. Local variables help you avoid cluttering the global
    environment with unnecessary names.  Moreover, <strong>the access to local
    variables is faster than to global ones</strong>.</p>
  </blockquote>
  
  <p>Could anyone explain why this is? And is this "feature" only in Lua, or is it in other languages aswell? (e.g. C, C++, Java)</p>