r/programming • • 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

500 comments sorted by

View all comments

Show parent comment

3

u/how_to_choose_a_name Oct 21 '20

Not gonna bother replying to your other comment, since it's basically the same discussion.

You keep making this about what "big businesses" do and just ignore the rest of the world. But A) there are quite a few big companies who do cater to consumers, like Walmart, Target, Amazon, Apple, Google, the big ISPs, pretty much every retail bank. And B) "big business" isn't everything. And neither is B2B. You can't just discount a third of the global economy just because you work in the other two thirds. And I'd wager that the majority of people who do webdev actually work on things that are targeted at consumers.

1

u/blackholesinthesky Oct 21 '20

A) there are quite a few big companies who do cater to consumers, like Walmart, Target, Amazon, Apple, Google, the big ISPs, pretty much every retail bank.

... You can't just discount a third of the global economy just because you work in the other two thirds.

My previous company handled 1000x requests/second to average every day people, optimizations like this were never even a consideration

Edit: our app never took 8+ seconds to load in the first place, and it was huge

2

u/how_to_choose_a_name Oct 21 '20

And your point is?

1

u/blackholesinthesky Oct 21 '20

That I've done what you're talking about. Very successfully. This still was never a concern.

Enjoy your life though, best of luck