Do common JavaScript implementations use string interning?

Yes. In general any literal string, identifier, or other constant string in JS source is interned. However implementation details (exactly what is interned for instance) varies, as well as when the interning occurs.

Note that a string value is not the same as a String Object though, String Objects are not interned because that would be fundamentally incorrect behaviour.

Leave a Comment