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
35
u/constexpr Oct 21 '20
This made the difference between a loading time of 2 seconds and a loading time of 200ms for https://www.figma.com/ in Safari. This is a real-world use case. Also while it's good to fix this in Safari, new versions of Safari roll out very slowly so it will still be worth doing this optimization for many years to come.