removeClass99

Benchmark created by David Condrey on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
fast
var z = document.body, c = " classname";
z.className = z.className.replace( c, '' );
z.className = z.className + c;
ready
jquery
var z = $('body'), c = " classname";
z.removeClass(c);
ready
combination
var z = $(document.body), c = " classname";
z.removeClass(c);
ready

Revisions

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

  • Revision 1: published by David Condrey on
  • Revision 2: published on