JavaScript
Article
By Sam Deering

Best of jsperf (2000-2013) – Part 2/3

By Sam Deering
Help us help you! You'll get a... FREE 6-Month Subscription to SitePoint Premium Plus you'll go in the draw to WIN a new Macbook SitePoint 2017 Survey Yes, let's Do this It only takes 5 min

Part 2 of the jsperf best of. Enjoy!

JavaScript/jQuery Loop Speed Tests

These test compare ways of looping in JavaScript and jQuery.

Comparison of loops using raw, underscore and interator patterns

for-vs-each

jQuery.each vs. for loop

Also see: SPEED QUESTION JQUERY.EACH VS. FOR LOOP
each-loops

jQuery Ajax Speed Tests

jQuery .live() vs .delegate() vs .on() vs bind()

See post jQuery .on() vs .live() if your unsure what the difference is.
live-on-bind-delegate

$(document).on() vs $(“body”).on()

document-vs-body-on

JSON vs JSONP

See post jQuery AJAX Demos if you want to see some action.
json-vs-jsonp

jsonp-json2

--ADVERTISEMENT--

jQuery Animation/CSS Speed Tests

$.css VS $.animate VS $.width

Using $.css() is fastest.
css-vs-animate-vs-width

JavaScript Templating Speed Tests

JavaScript template language shootoff

jquery-templates-comparison

Login or Create Account to Comment
Login Create Account
Recommended
Sponsors
Get the latest in JavaScript, once a week, for free.