Re:Andro.js
by pavlov on Tuesday February 21, 2012 @09:24AM
(#3616509)
I'm not convinced this is useful JavaScript optimization advice. JavaScript doesn't have integers, and string literals are interned, so it shouldn't make a substantial difference if you have the same literal written out 15 times or just defined once and placed in a property. (In fact, using the plain literal everywhere may be faster because it omits the dynamic property access.)
[ Parent
| on HN ]
Re:Andro.js
by jcromartie on Tuesday February 21, 2012 @10:04AM
(#3616667)
I'd rather mistype an identifier than a string literal, because nothing will complain about the wrong string literal.