triple equals vs twice equals-3

JavaScript performance comparison

Revision 6 of this test case created by

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  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;

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
3-equals-true
result = (testStr === testStrSame);
pending…
2-equals-true
result = (testStr == testStrSame);
pending…
3-equals-false
result = (testStr === testStrDiff);
pending…
2-equals-false
result = (testStr == testStrDiff);
pending…

Compare results of other browsers

Revisions

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

0 Comments