4 ms·
Not really: http://jsperf.com/d97b341f-cfc1-4057-bdc9-60e80adb5cf6 http://jsperf.com/d97b341f-cfc1-4057-bdc9-60e80adb5cf6
by Schlaefer 13y ago
Not really: http://jsperf.com/d97b341f-cfc1-4057-bdc9-60e80adb5cf6 http://jsperf.com/d97b341f-cfc1-4057-bdc9-60e80adb5cf6
- simonw 13y agoThere is however a significant performance improvement to be had by optimising the inner loop, which is what any good programmer would do first here: http://jsperf.com/d97b341f-cfc1-4057-bdc9-60e80adb5cf6/2 http://jsperf.com/d97b341f-cfc1-4057-bdc9-60e80adb5cf6/2
- k3n 13y agoWritten sanely, it's only marginally slower; it's so close that it's inconsequential for 99% of uses.
- ldng 13y agoYou still have to download 81Kb of code whereas native is just that, native ;-) It's a trade-off. Depends which browser uses your target/customer.
- Schlaefer 13y agoThis optimization is actually replacing jQuery in the inner loop with native calls. It was my impression that the OP suggested that this could be performed more efficiently using jQuery.