by judge2020 · 6y ago · 0 comments
while true {
let hello = "world";
}
The scope would keep getting freed then re-allocated, which will be slower than simply continuously setting an existing variable's memory location over and over again.`let` can be changed so cannot be optimized out this way (at least not without doing more complex analysis and proving that the variable is not being changed).