Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array.flat() vs. concat() + spreadOperator + concat.apply()
Compare the Array.flat() to concat() + spread operator
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0
Browser:
Firefox 144
Operating system:
Linux
Device Platform:
Desktop
Date tested:
5 months ago
Test name
Executions per second
concat() + spread operator
11340035.0 Ops/sec
Array.flat()
14784101.0 Ops/sec
concat.apply()
11894819.0 Ops/sec
Tests:
concat() + spread operator
var params = [[ 1, 2 ], [ "hello", true, 7 ]]; var other = [].concat(...params);
Array.flat()
var params = [[1, 2, params], [ "hello", true, 7 ]]; var other = params.flat();
concat.apply()
var params = [[ 1, 2 ], [ "hello", true, 7 ]]; var other = [].concat.apply([], params);