DOM.create vs jquery

JavaScript performance comparison

Revision 32 of this test case created

Info

Compare performance of the better-dom library and jquery in typical cases

Preparation code

<script src="//code.jquery.com/jquery-git2.js"></script>
<script src="//raw.githubusercontent.com/chemerisuk/better-dom/master/dist/better-dom.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#create(String)
jQuery("<a>");
pending…
DOM#create(String)
DOM.create("a");
pending…
jquery#create(Element)
jQuery(document.createElement("a"));
pending…
DOM#create(Element)
DOM.create(document.createElement("a"));
pending…
jquery#create(Html) with vars
jQuery("<a>", {id: "a1", rel: "b2"}).append("<span>").append("<i>");
pending…
DOM#create(Emmet) with vars
DOM.create("a#{0}[rel={1}]>span+i", ["a1", "b2"]);
pending…
jquery#create(Html) without vars
jQuery("<a id='a1' rel='b2'><span></span><i></i></a>");
pending…
DOM#create(Html)
DOM.create("<a id='a1' rel='b2'><span></span><i></i></a>");
pending…
DOM#create(Emmet) without vars
DOM.create("a#a1[rel=b2]>span+i");
pending…
native complex create
var link = document.createElement("a");

link.id = "a1";
link.rel = "b2";
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