Arguments vs object

Benchmark created on


Setup

function sumArgs(a, b) { return a + b }

function sumObj({a, b}) { return a + b }

Test runner

Ready to run.

Testing in
TestOps/sec
Arguments
sumArgs(Math.random(), Math.random())
ready
Object
sumObj({ a: Math.random(), b: Math.random() })
ready

Revisions

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