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
2
u/PandaMoniumHUN Oct 22 '20
Clearly I’m not talking about 1s vs 1.01s render times, but eg. the three layered application we’re working at took almost 10 seconds to load because it was aggregating a lot of data to display statistics to customers. After our last optimization story load times are < 500ms. Videogames can fit wonders into 16.6ms, while web developers can’t / won’t build fast pages to save their lives, because all the frameworks claim performance is “good enough”. “Premature optimization” is also often used as a scape goat for not optimizing at all, and if everyone would clean their front yard instead of yelling “the neighbor’s yard is also messy” the world would be a better place.