triple equals vs twice equals-3 (v6)

Revision 6 of this benchmark created on


Setup

var testStr = '';
    for(var i=0;i<4;i++) testStr += '1';
    var testStrSame = '';
    for(var i=0;i<2;i++) testStr += '11';
    var testStrDiff = '';
    for(var i=0;i<4;i++) testStr += '2';
    var result;

Test runner

Ready to run.

Testing in
TestOps/sec
3-equals-true
result = (testStr === testStrSame);
ready
2-equals-true
result = (testStr == testStrSame);
ready
3-equals-false
result = (testStr === testStrDiff);
ready
2-equals-false
result = (testStr == testStrDiff);
ready

Revisions

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