Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
rest parameters vs arguments 5
(version: 0)
Comparing performance of:
rest arguments vs array parameter
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
function restFn(...args) { return args.map((x)=>x) } function arrFn(args) { return args.map((x)=>x) }
Tests:
rest arguments
const els = restFn('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
array parameter
const els = arrFn(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
rest arguments
array parameter
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Arrow function vs normal function
function vs new function
Noop vs new arrow function call
Arrow function vs bind function creation
Arrow function vs function comparison
Comments
Confirm delete:
Do you really want to delete benchmark?