Performance concern with let/const

Andreas Rossberg rossberg at google.com
Tue Sep 18 04:24:19 PDT 2012


On 17 September 2012 18:37, Luke Hoban <lukeh at microsoft.com> wrote:
> 'let' is certainly not going to be faster than 'var' in any case

There is at least one very important counterexample to that claim: the
global scope. Assuming lexical global scope (as we tentatively agreed
upon at the last meeting) using 'let' in global scope will be
_significantly_ faster than 'var', without even requiring any
cleverness from the VM.

/Andreas


More information about the es-discuss mailing list