Test vs Test

Benchmark created by Nadir on


Description

Performance difference between testing and setting a value.

Setup

var testInteger = 5;
    var testString = "string";

Test runner

Ready to run.

Testing in
TestOps/sec
Test integer
if (testInteger != 5) {
  testInteger == 5;
}
ready
Set integer
testInteger = 5;
ready
Test string
if (testString == "string") {
  testString == "string";
}
ready
Set string
testString = "string";
ready

Revisions

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

  • Revision 1: published by Nadir on