All about Mozilla's JavaScript engine

Optimizing JavaScript variable access

Luke Wagner recently completed an overhaul of the way SpiderMonkey accesses variables, especially closure variables, to make everything simpler and faster. He blogged about it on his personal blog, complete with “how this would be written in JS” code snippets: