Is strict mode more performant?

Is strict mode intended, amongst its other goals, to allow browsers to introduce additional optimisations or other performance enhancements?

Whether or not it was intended to do this, I’m not sure, although I think the answer is yes.

But I can say with certainty that strict mode does provide these opportunities, and browsers will implement them — regardless whether providing those opportunities was an intentional goal for the ECMA committee. However, I wouldn’t expect all those opportunities to be taken immediately. In many cases the mantra is likely to be correctness first, performance later, because strict mode is not widely used right now. (I work on Mozilla’s JavaScript engine and have implemented various parts of strict mode, and we’re implementing it this way as a general rule — although I could probably think of an exception or two if I tried.)

Leave a Comment