createElement (v26)

Revision 26 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.2.0/prototype.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="sandbox"></div>

Setup

var sandbox = $('#sandbox');
    sandbox.html('')

Teardown


    sandbox.html('')
  

Test runner

Ready to run.

Testing in
TestOps/sec
prototype
var test = new Element('span', {'class': 'test'});
sandbox.html(test);
ready
raw
var test = document.createElement('span');
test.className = 'test';
sandbox.html(test);
ready
jquery
var test = $('<span>').addClass('test')
sandbox.html(test);
ready
string
var test = "<span class='test'></span>";
sandbox.html(test);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.