Vanilla JS vs jQuery

JavaScript performance comparison

Revision 4 of this test case created by

Preparation code

<script src="https://code.jquery.com/jquery-1.8.3.js"></script>
<div id="myelement"></div>
      
<script>
Benchmark.prototype.setup = function() {
  var w = function(e, a) {
    document.getElementById(e).innerHTML = a;
  }

};
</script>

Preparation code output

<div id="myelement"></div>

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
Vanilla JS
w('myelement', "I was written with JavaScript!");
pending…
jQuery
$("#myelement").html("I was written with jQuery!");
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.

0 Comments