increment numbers apoc123

Benchmark created by Kalix on


Preparation HTML

};
</script>

Setup

<script>
      Benchmark.prototype.setup = function() {
        var numsToPad=[[1],[14],[33]];

Test runner

Ready to run.

Testing in
TestOps/sec
beforecheck
function increaseNumber(num) {
  num = num + 1;
  if (num > 49) {
    return 49;
  }
  return num;
}
increaseNumber(numsToPad[0]);
increaseNumber(numsToPad[1]);
increaseNumber(numsToPad[2]);
ready
aftercheck
function increaseNumber(num) {
  if (num == 49) {
    return num;
  }
  return num + 1;
}
increaseNumber(numsToPad[0]);
increaseNumber(numsToPad[1]);
increaseNumber(numsToPad[2]);
ready

Revisions

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

  • Revision 1: published by Kalix on