Arguments vs object (v2)

Revision 2 of this 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 1
sumObj({ a: Math.random(), b: Math.random() })
ready
Object 2
sumObj({ b: Math.random(), a: Math.random() })
ready

Revisions

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