News for hackers. Stuff that matters.
Re:How to write up to 98% faster JavaScript code. by lucisferre on Friday April 15, 2011 @04:52PM (#2452159)
Could you be specific about what was deliberately misleading? You've made the assertion but didn't specify what you were referring to. Sad to see that kind of silliness on HN.
Re:How to write up to 98% faster JavaScript code. by bcrescimanno on Friday April 15, 2011 @05:20PM (#2452250)
It's deliberately misleading to say that jQuery and other libraries use a pattern where (internal to the library) there are constant, deep chain lookups. The entire "problem" can be easily "fixed" with the solution above--cache local references so you're not doing deep-lookups constantly (which, if you look at the source of the referenced libraries, you won't find).

As I said; it's either deliberately misleading--or the author's understanding of javascript is too limited as to be making claims that "jQuery and other libraries could have been 98% faster." A comment, by the way, which was later modified to state "if you are not a JavaScript Ninja your framework code could have been up to 98% faster."

Sorry, I don't file that knowledge under "Javascript Ninja" knowledge--and moreover, the original comment was designed to say, "My library is faster / better than all of these popular libraries."

[Edit] To my (admittedly cynical at times) that adds up to deliberately misleading.