The critical phrase is: "According to the numbers presented by the Taskspeed benchmark..." Is jQuery, as a whole, 2x faster in 1.4.2 compared to 1.4.1? Provably not - we didn't make changes to all of jQuery (and even if we did, how would we determine a global improvement of that quantity in a reasonable manner?).
That being said there were two areas in which there was genuine improvement made that will affect your code:
* Continuing to improve the speed of remove/empty/html. These methods are heavily used so anything done here will improve your code, absolutely.
* Improving speed of inserting a single DOM node. This was an interesting case. In jQuery core we use DOM fragments to hold and insert DOM nodes. It's faster for when you have multiple DOM nodes to insert - but actually slightly slower if you only have one to insert. In that case we just route around it and insert the node directly (this sped of WebKit, for example).
Those are the changes that I'm most pleased with, for sure. It's easy to gauge the difference between jQuery and native performance in absolute terms (time in milliseconds) but at some point we simply won't be able to get any faster - the overhead will be a couple function calls and some if/else statements (which is effectively what's happened to a few jQuery methods). So yeah, I'm not sure how far away we are but I will absolutely keep working towards that getting us closer to that ideal.
That being said there were two areas in which there was genuine improvement made that will affect your code:
* Continuing to improve the speed of remove/empty/html. These methods are heavily used so anything done here will improve your code, absolutely.
* Improving speed of inserting a single DOM node. This was an interesting case. In jQuery core we use DOM fragments to hold and insert DOM nodes. It's faster for when you have multiple DOM nodes to insert - but actually slightly slower if you only have one to insert. In that case we just route around it and insert the node directly (this sped of WebKit, for example).
Those are the changes that I'm most pleased with, for sure. It's easy to gauge the difference between jQuery and native performance in absolute terms (time in milliseconds) but at some point we simply won't be able to get any faster - the overhead will be a couple function calls and some if/else statements (which is effectively what's happened to a few jQuery methods). So yeah, I'm not sure how far away we are but I will absolutely keep working towards that getting us closer to that ideal.