DOM.create vs jquery

JavaScript performance comparison

Revision 24 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-2.1.0.js"></script>
<script src="//rawgithub.com/chemerisuk/better-dom/v1.7.0/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(HtmlString)
jQuery("<a id='a1' rel='b2'><span></span><i></i></a>");
pending…
DOM#create(HtmlString)
DOM.create("<a id='a1' rel='b2'><span></span><i></i></a>");
pending…
DOM#create(EmmetString)
DOM.create("a#a1[rel=b2]>span+i");
pending…
jquery#create(Options)
jQuery("<a>", {id: "a1", rel: "b2"}).append("<span>", "<i>");
pending…
DOM#create(Options)
DOM.create("a#id=${id}[rel=${rel}]", {id: "a1", rel: "b2"}).append("span", "i")
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