Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS multiple function arguments vs. single arguments object (without var)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Browser:
Chrome 137
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
11 months ago
Test name
Executions per second
Multiple arguments
87771544.0 Ops/sec
args object
14364430.0 Ops/sec
Script Preparation code:
const data = { a: 1, b: 2, c: 3, d: 4, e: 5, f: 6 }; function f1(a, b, c, d, e, f, g) { return a + b + c + d + e + f + g; }
Tests:
Multiple arguments
f1(data.a, data.b, data.c, data.d, data.e, data.f, Math.random())
args object
f1({ a: data.a, b: data.b, c: data.c, d: data.d, e: data.e, f: data.f, g: Math.random() })