News for hackers. Stuff that matters.
Re:JQuery 1.5.1 released, includes full IE 9 support by rorrr on Friday February 25, 2011 @02:24AM (#2261380)
Out of curiousity I tested that particular statement, and you're right. Compared to

    $('#foo').attr('bar', 'baz');
your code is

30 times faster in Chrome 9

81 times faster in Firefox 3.6

Re:JQuery 1.5.1 released, includes full IE 9 support by mazuhl on Friday February 25, 2011 @10:13AM (#2262395)
47 times faster in Firefox 3.6.1 7 times faster in IE 8
Re:JQuery 1.5.1 released, includes full IE 9 support by ams6110 on Friday February 25, 2011 @10:04AM (#2262366)
In most cases, though, using jquery to do something like adding a class, or setting a value, is still plenty fast enough. We're talking about code that runs in the browser, where things move on human timescales. Don't optimize prematurely.
Re:JQuery 1.5.1 released, includes full IE 9 support by bzbarsky on Sunday February 27, 2011 @11:21PM (#2270022)
The problems start when you add a class to 10,000 elements on the page. And yes, I've seen pages doing this with jquery where the jquery overhead was what made the difference between a 20ms operation (not user-perceptible) and a 1s operation (very much user-perceptible).
Re:JQuery 1.5.1 released, includes full IE 9 support by tropin on Friday February 25, 2011 @06:12AM (#2261812)
Could you share your test code?