equals string vs integer

Benchmark created on


Setup

var s1 = "Hello";
    var s2 = "Hello World";
    var i1 = 0;
    var i2 = 1;
    var truthy;

Test runner

Ready to run.

Testing in
TestOps/sec
Integer Compare
truthy = i1 === 0;
truthy = i2 === 0;
ready
String Compare
truthy = s1 === 'Hello';
truthy = s2 === 'Hello';
ready

Revisions

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