jquery vs createElement (v62)

Revision 62 of this benchmark created by Ben on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery object
var test = $('<span />', { class: 'test-class' });
ready
jQuery string
var test = $('<span class="test-class" />');
ready
createElement
var test = $(document.createElement('span')).addClass('test-class');
ready
full native
var test = document.createElement('span');
test.classList.add('test-class');
ready

Revisions

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