jquery vs createElement

JavaScript performance comparison

Revision 134 of this test case created by tak

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
jquery
var test = $('<span></span>');
test.append($('<span>yo</span>'))
pending…
createElement
var test = $(document.createElement('span'));
var tempTest = $(document.createTextNode('yo'));
var tempTest2 = $(document.createElement('span'));
tempTest2.append(tempTest);
test.append(tempTest2);
pending…
createElement - all
var test = document.createElement('span');
var tempTest = document.createElement('span');
tempTest.appendChild(document.createTextNode('yo'));
test.appendChild(tempTest);
$(test);
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