Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
concat vs spread operator vs push 200
(version: 1)
Compare the new ES6 spread operator with the traditional concat() method and push
Comparing performance of:
Array.prototype.concat vs spread operator vs Push
Created:
7 years ago
by:
Registered User
Jump to the latest result
Tests:
Array.prototype.concat
var params = [ 265120,265119,265118,265117,265116,265115,265114,265113,265112,265111,265110,265109,265108,265107,265106,265105,265104,265103,265102,265101,265100,265099,265098,265097,265096,265095,265094,265093,265092,265091,265090,265089,265088,265087,265086,265085,265084,265083,265082,265081,265080,265079,265078,265077,265076,265075,265074,265073,265072,265071,265070,265069,265068,265067,265066,265065,265064,265063,265062,265061,265060,265059,265058,265057,265056,265055,265054,265053,265052,265051,265050,265049,265048,265047,265046,265045,265044,265043,265042,265041,265040,265039,265038,265037,265036,265035,265034,265033,265032,265031,265030,265029,265028,265027,265026,265025,265024,265023,265022,265021,265020,265019,265018,265017,265016,265015,265014,265013,265012,265011,265010,265009,265008,265007,265006,265005,265004,265003,265002,265001,265000,264999,264998,264997,264996,264995,264994,264993,264992,264991,264990,264989,264988,264987,264986,264985,264984,264983,264982,264981,264980,264979,264978,264977,264976,264975,264974,264973,264972,264971,264970,264969,264968,264967,264966,264965,264964,264963,264962,264961,264960,264959,264958,264957,264956,264955,264954,264953,264952,264951,264950,264949,264948,264947,264946,264945,264944,264943,264942,264941,264940,264939,264938,264937,264936,264935,264934,264933,264932,264931,264930,264929,264928,264927,264926,264925,264924,264923,264922,264921 ]; params.reduce(( output, a) => { return output.concat([a]); }, output = []);
spread operator
var params = [ 265120,265119,265118,265117,265116,265115,265114,265113,265112,265111,265110,265109,265108,265107,265106,265105,265104,265103,265102,265101,265100,265099,265098,265097,265096,265095,265094,265093,265092,265091,265090,265089,265088,265087,265086,265085,265084,265083,265082,265081,265080,265079,265078,265077,265076,265075,265074,265073,265072,265071,265070,265069,265068,265067,265066,265065,265064,265063,265062,265061,265060,265059,265058,265057,265056,265055,265054,265053,265052,265051,265050,265049,265048,265047,265046,265045,265044,265043,265042,265041,265040,265039,265038,265037,265036,265035,265034,265033,265032,265031,265030,265029,265028,265027,265026,265025,265024,265023,265022,265021,265020,265019,265018,265017,265016,265015,265014,265013,265012,265011,265010,265009,265008,265007,265006,265005,265004,265003,265002,265001,265000,264999,264998,264997,264996,264995,264994,264993,264992,264991,264990,264989,264988,264987,264986,264985,264984,264983,264982,264981,264980,264979,264978,264977,264976,264975,264974,264973,264972,264971,264970,264969,264968,264967,264966,264965,264964,264963,264962,264961,264960,264959,264958,264957,264956,264955,264954,264953,264952,264951,264950,264949,264948,264947,264946,264945,264944,264943,264942,264941,264940,264939,264938,264937,264936,264935,264934,264933,264932,264931,264930,264929,264928,264927,264926,264925,264924,264923,264922,264921 ]; params.reduce(( output, a) => { return [...output, a]; }, output = []);
Push
var params = [ 265120,265119,265118,265117,265116,265115,265114,265113,265112,265111,265110,265109,265108,265107,265106,265105,265104,265103,265102,265101,265100,265099,265098,265097,265096,265095,265094,265093,265092,265091,265090,265089,265088,265087,265086,265085,265084,265083,265082,265081,265080,265079,265078,265077,265076,265075,265074,265073,265072,265071,265070,265069,265068,265067,265066,265065,265064,265063,265062,265061,265060,265059,265058,265057,265056,265055,265054,265053,265052,265051,265050,265049,265048,265047,265046,265045,265044,265043,265042,265041,265040,265039,265038,265037,265036,265035,265034,265033,265032,265031,265030,265029,265028,265027,265026,265025,265024,265023,265022,265021,265020,265019,265018,265017,265016,265015,265014,265013,265012,265011,265010,265009,265008,265007,265006,265005,265004,265003,265002,265001,265000,264999,264998,264997,264996,264995,264994,264993,264992,264991,264990,264989,264988,264987,264986,264985,264984,264983,264982,264981,264980,264979,264978,264977,264976,264975,264974,264973,264972,264971,264970,264969,264968,264967,264966,264965,264964,264963,264962,264961,264960,264959,264958,264957,264956,264955,264954,264953,264952,264951,264950,264949,264948,264947,264946,264945,264944,264943,264942,264941,264940,264939,264938,264937,264936,264935,264934,264933,264932,264931,264930,264929,264928,264927,264926,264925,264924,264923,264922,264921 ]; params.reduce(( output, a) => { output.push(a); return output; }, output = []);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Array.prototype.concat
spread operator
Push
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!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
It appears that the provided text is not a code snippet or a programming-related question, but rather a collection of benchmark results and test data. However, if we were to extract relevant information from this text, I would focus on the following: 1. **Benchmark Results**: The text contains three benchmark results with different test names: "Push", "Array.prototype.concat", and "spread operator". 2. **Browser and Device Information**: Each benchmark result includes information about the browser version (Firefox 64), device platform (Desktop), and operating system (Mac OS X 10.13). 3. **Execution Frequency**: The "ExecutionsPerSecond" column provides the number of executions per second for each test. If you could provide more context or clarify what you would like to achieve with this data, I'd be happy to help further!
Related benchmarks:
spread operator vs push Brian
spread operator vs push Brian2
Array concat vs spread operator vs push larger list
zk test spread vs push
Array push vs spread when reducing over results
Comments
Confirm delete:
Do you really want to delete benchmark?