removeAttr with check for 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=0B6yiDAQGhvdFOWJlNjVjYzItNmQzYS00ZWI4LWEyM2QtNmVlZThjNzY5MDJk&export=download"></script>
<script>
var $test = jQuery.noConflict(); 
</script>
<div class="parent">
<div></div>
</div>

Setup

var currentDiv = $current( ".parent > div" ),
    testDiv = $test( ".parent > div" );

Test runner

Ready to run.

Testing in
TestOps/sec
current removeAttr
currentDiv.removeAttr( "bla" );
ready
test removeAttr
testDiv.removeAttr( "bla" );
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