jQuery vs native class addition (v63)

Revision 63 of this benchmark created by briznadTMG on


Description

how well does jQuery addClass perform vs native classList.add

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<div id="test">test</test>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery addClass
$('#test').addClass('test');
ready
native classList.add
var test = document.getElementById('test');
test.classList.add('test');
ready

Revisions

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