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; rv:130.0) Gecko/20100101 Firefox/130.0
Browser:
Firefox 130
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Multiple arguments
2603189760.0 Ops/sec
args object
10108555.0 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() })