jquery sucks

JavaScript performance comparison

Test case created

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
 

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
no jquery
var div = document.createElement("div")
pending…
jquery
var div =  $("<div>")
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

1 comment

James commented :

This is why I prefer to write my own JS logic when high performance is required. jQuery is probably okay for line of business apps (as are many libraries in general), but no game-focused or similar multimedia developer worth their weight in salt would use ANY library not tailored for speed. That said, high volume sites, like the Google main page, would do well to avoid it also, to reduce bandwidth, and increase loading speed. Unfortunately, many libraries (not just jQuery) have many methods that call other methods (like .fn.each calling jQuery.each), or code to satisfy all possible use cases. Trying to appease everyone can cause bloat unfortunately. jQuery is great to work fast, but consider the audience and future costs before settling on it as the main underlying tool to build a web app.

Add a comment