jquery sucks

JavaScript performance comparison

Test case created by

Preparation code

<script src="https://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 CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
no jquery
var div = document.createElement("div")
var div =  $("<div>")

Compare results of other browsers


You can edit these tests or add even more tests to this page by appending /edit to the URL.


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.

Gerson commented :

Yes I know it sucks.

A one-off application i developed for a client, JQuery in Wordpress site with all the plugins installed. 300KB of script.

Equivalent in JS, 30KB (not minified)