boolean vs equal (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script>
  var b = 1;
  
  if( b ) null;
  
  if( b == 1 ) null;
  
  if( b === 3 ) null;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Boolean ( b )
if ( b );
ready
Equal operator
if ( b == 1) ;
ready
Strict equal
if( b === 1 );
ready
Strict equal negative number
if( b === -1 );
ready
Equal operator negative number
if( b == -1 );
ready

Revisions

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