Encoding unit — one grounded idea

1 The with statement temporarily adds an object to the front of the scope chain, pushing local variables into the first slot and increasing resolution time.
“As soon as execution flows into the with statement, you end up with a scope chain that looks like this. There's a variable object that's pushed to the front. So, now that has all of your with block variables and that means that all of the local variables to your function are now one step away in the scope chain and that will affect your performance.”
spoken · 586s · 2009-06-05 · en · Google TechTalks · Speed Up Your JavaScript
id: 892d95d7979b0e9b
concepts in this idea