|
|
|
|
|
by jlokier
2049 days ago
|
|
"Looking at the let" refers to code analysis during JIT compile time, which happens once for each bit of code, not run time which happens many times as the same bits of code are run. When comparing the speed of "const" versus "let", the JIT compile time is irrelevant; the speed differences being looked at are entirely run time, inside loops. Also the JIT compile time difference from "looking at the let" will be so low as to be virtually unmeasurable anyway. (It is such a trivial check, much simpler than almost everything else the compiler does.) (However, see rewq4321's sibling comment about analysability and JavaScript being a very dynamic language when "eval" is used.) |
|