Will there be any speed advantage in using the ES6 "let" or "const" declarations instead the old faithful var?
Asked
Active
Viewed 262 times
7
-
1I don't think `let` can make anything simpler for the compiler. – Denys Séguret Mar 28 '14 at 13:01
-
7This isn't a duplicate, the other question isn't about speed. But I'm not sure SO is the right place for this question either, as the implementations are still in work – Denys Séguret Mar 28 '14 at 13:07
-
1@Richard i suggest making some benchmarking so you can tell it on your own – Mar 28 '14 at 13:10
-
Using `let` and `const` in common scope? – thefourtheye Mar 28 '14 at 14:14
-
1Babel transpiles `let` statements to uniquely-named `var`s anyway, so there's no difference in speed when running Babel-transpiled code (unless you consider that vars of the same name would mean fewer variables in memory). – Andy Sep 01 '15 at 18:39
-
1I modified the code here ( http://stackoverflow.com/questions/21467642/is-there-a-performance-difference-between-let-and-var ) to include a test for `const`, and found that `const` is actually noticeably slower than the other options. – Yay295 Jul 03 '16 at 07:10