jquery vs createElement (v54)

Revision 54 of this benchmark created by Joey 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
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.