jquery vs createElement

JavaScript performance comparison

Revision 22 of this 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
jquery
var test = $('<li class="item selected"><a onclick="return false;" class="image" href="#"><img height="480" src="http://s1.portal.nechehin.dvdev.org.ua/g2-SpBEb9fAka-hRwXyCjEY9Q/glamurchik/640x480/f/0/1-5-3-5-1535/202488_boatmurderedawesome.jpg"></a><div class="description">123sdfasdfasd<span>Фото: fgsdfg, ASDFASDF</span></div></li>');
pending…
createElement
var tmp = document.createElement('div');
tmp.innerHTML = '<li class="item selected"><a onclick="return false;" class="image" href="#"><img height="480" src="http://s1.portal.nechehin.dvdev.org.ua/g2-SpBEb9fAka-hRwXyCjEY9Q/glamurchik/640x480/f/0/1-5-3-5-1535/202488_boatmurderedawesome.jpg"></a><div class="description">123sdfasdfasd<span>Фото: fgsdfg, ASDFASDF</span></div></li>';
var test = $(tmp.children[0]);
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:

0 comments

Add a comment