Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
concat vs lodash.concat vs destructuring
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser:
Chrome 132
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
Destructure
54.2M/s
Array.prototype.concat
21.6M/s
Lodash concat
10.6M/s
View exact numbers
Test name
Executions per second
✓
Destructure
54,226,632 Ops/sec
Array.prototype.concat
21,569,844 Ops/sec
Lodash concat
10,613,292 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Tests:
Array.prototype.concat
var params = [ "hello", "hello", "sname" ]; var other = [ "red", "wine" ].concat(params);
Lodash concat
var params = [ "hello", "hello", "sname" ]; var other = _.concat([ "red", "wine" ], params);
Destructure
var params = [ "hello", "hello", "sname" ]; var other = [...[ "red", "wine" ], ...params];