triple equals vs twice equals (v18)

Revision 18 of this benchmark created on


Setup

var testStr = 'test';
    var testInt = 111;
    var testIntSame = 111;
    var testIntDiff = 112;
    var testIntStr = '111';
    var result;

Test runner

Ready to run.

Testing in
TestOps/sec
3-equals-false
result = (testStr === testInt);
ready
2-equals-false
result = (testStr == testInt);
ready
3-equals-true
result = (testIntStr === testInt);
ready
2-equals-true
result = (testIntStr == testInt);
ready
2-equals-true-non-coerced
result = (testIntSame == testInt);
ready
2-equals-false-non-coerced
result = (testIntDiff == testInt);
ready
3-equals-true-non-coerced
result = (testIntSame === testInt);
ready
3-equals-false-non-coerced
result = (testIntDiff === testInt);
ready
Str to str tripple
result = (testStr  === testStr );
ready
Str to str double
result = (testStr  == testStr );
ready

Revisions

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