removeClass without check for className attr

Benchmark created by Orkel on


Preparation HTML

<script src="https://code.jquery.com/jquery-1.7b1.js"></script>
<script>
var $current = jQuery.noConflict(); 
</script>

<script src="https://docs.google.com/uc?id=0B6yiDAQGhvdFZTVkOWUxOWItZjAwMy00YzMyLTk0ZTgtODZmYjhlMjhmN2Zi&export=download"></script>
<script>
var $test = jQuery.noConflict(); 
</script>
<div id="div">
</div>

Setup

var currentDiv = $current( "#div" ),
        testDiv = $test( "#div" );

Test runner

Ready to run.

Testing in
TestOps/sec
current removeClass
currentDiv.removeClass("class");
ready
test removeClass
testDiv.removeClass("class");
ready

Revisions

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

  • Revision 1: published by Orkel on