Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS multiple function arguments vs. single arguments object
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0
Browser:
Chrome 128
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Multiple arguments
1836278.6 Ops/sec
args object
1471745.2 Ops/sec
Script Preparation code:
var 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() })