class for new node

JavaScript performance comparison

Revision 6 of this test case created

Preparation code

<script src="//code.jquery.com/jquery-2.0.0b1.min.js"></script>
<div id="foo"></div>

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
fragment
var div = $('<div class="bar"></div>');
$('#foo').append(div);
pending…
jq obj
var div = $('<div></div>',{'className':'bar'});
$('#foo').append(div);
pending…
native
(function(d){
    var div = d.createElement('div');
    div.className = "bar";
    d.getElementById("foo").appendChild(div);
}(document));
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