News for hackers. Stuff that matters.
Re:How to write up to 98% faster JavaScript code. by ehynds on Friday April 15, 2011 @04:09PM (#2452010)
That's why you cache methods to reduce lookups.

http://jsperf.com/global-namespace-chain-vs-string-based-loc...

In your tests the method "add" is pretty far away from it's original variable, and MUCH further away than any jQuery method is, so you're also testing the time it takes to lookup that method. In jQuery, methods are either attached to "jQuery" directly or on the prototype.

Re:How to write up to 98% faster JavaScript code. by Hipchan on Friday April 15, 2011 @04:57PM (#2452182)
Doesn't Google Compiler do this for you?