addClass - Sprint.js vs vanilla JavaScript (v10)

Revision 10 of this benchmark created on


Preparation HTML

<p class=foo></p>

<script src="//sprintjs.com/prod"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Sprint
Sprint(".foo").addClass("bar")
ready
Vanilla JavaScript
[].forEach.call(document.getElementsByClassName("foo"), function(el) {
  el.classList.add("bar")
})
ready

Revisions

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