Parameter object vs inline

Benchmark created by Vageesh Dwivedi on


Preparation HTML

<html>
<head></head>
<body></body>
</html>

Test runner

Ready to run.

Testing in
TestOps/sec
params
function withParams(params) {
  console.log(params)
}

function test() {
  var params = {
    a: 0,
    b: 1,
    c: 2
  };

  withParams(params);
}

test();
ready
inline
function withParams(params) {
  console.log(params)
}

function test() {
  withParams({
    a: 0,
    b: 1,
    c: 2
  });
}

test();
ready

Revisions

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

  • Revision 1: published by Vageesh Dwivedi on