Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
array arg vs spread args
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 15; Mobile; rv:148.0) Gecko/148.0 Firefox/148.0
Browser:
Firefox Mobile 148
Operating system:
Android
Device Platform:
Mobile
Date tested:
6 months ago
Benchmark engine:
Benchmark.js
spread
6.7M/s
array
6.5M/s
View exact numbers
Test name
Executions per second
✓
spread
6,656,364 Ops/sec
array
6,531,498 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function classesArray(classes) { return classes.filter(Boolean).join(' '); } function classesSpread(...classes) { return classes.filter(Boolean).join(' '); }
Tests:
array
classesArray([ 'Foo', undefined, 'Bar', ])
spread
classesSpread( 'Foo', undefined, 'Bar', )