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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Browser:
Chrome 145
Operating system:
Linux
Device Platform:
Desktop
Date tested:
6 months ago
Benchmark engine:
Benchmark.js
spread
6.1M/s
array
6.0M/s
View exact numbers
Test name
Executions per second
✓
spread
6,074,836 Ops/sec
array
6,019,618 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', )