Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
rest parameters vs arguments 4
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15
Browser:
Safari 26
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
6 months ago
Benchmark engine:
Benchmark.js
array parameter
22.7M/s
rest arguments
18.3M/s
View exact numbers
Test name
Executions per second
✓
array parameter
22,653,242 Ops/sec
rest arguments
18,349,802 Ops/sec
Script Preparation code:
function h1(...args) { return args.map((x)=>x) } function h2(args) { return args.map((x)=>x) }
Tests:
rest arguments
const els = h1("1","1","1","1","1","1","1","1","1");
array parameter
const els = h2(["1","1","1","1","1","1","1","1","1"]);