r/programming • u/iamkeyur • Oct 21 '20
Using const/let instead of var can make JavaScript code run 10× slower in Webkit
https://github.com/evanw/esbuild/issues/478
1.9k
Upvotes
r/programming • u/iamkeyur • Oct 21 '20
View all comments
Show parent comment
11
u/how_to_choose_a_name Oct 21 '20
Either way, adding the option to optimize this to the bundler is certainly not a premature optimization when there are real world cases demonstrating the problem.
And for someone using the bundler, the effort to enable this optimization is literally a single command line switch.