fx4waldi-defaults

Benchmark created on


Setup

function fn(arg, other) {
    arg = arg === undefined ? 1 : arg;
    other = other === undefined ? 3 : other;
    return other;
  }
  
  
  function fn2(arg = 1, other = 3) {
    return other;
  }

Test runner

Ready to run.

Testing in
TestOps/sec
without
fn();
  fn(2);
  fn(2, 4);
ready
with
fn2();
  fn2(2);
  fn2(2, 4);
ready

Revisions

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