Dan Shappir
May 7, 2016 · 1 min read

@Michael, thank you for the positive feedback.

It’s a happy coincidence that for JavaScript several coding best practices result in potentially faster code. But you should definitely be careful when performing other types of optimizations before measuring. If your changes are just in order to make the code more efficient, not in order to improve its structure, then there is a very good chance that you’re wasting time. Even worse, you’re potentially wasting future time as well, as the code becomes harder to maintain.

My recommendation: first use best practices for all your code, which now you have a doubled incentive for. Then measure and manually optimize those specific sections which constitute bottlenecks. I hope this answers your question.

    Dan Shappir

    Written by

    I’m a Performance Specialist at Wix.com. My job is to make 80 million websites hosted on the Wix platform load and execute faster. Opinions are my own