Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
push / shift 2
(version: 0)
Comparing performance of:
10 ^ 2 vs 10 ^ 3 vs 10 ^ 4 vs 10 ^ 5 vs 10 ^ 6 vs 10 ^ 7
Created:
7 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var arrays = [2, 3, 4, 5, 6, 7].reduce((acc, pow) => { const array = []; const length = Math.pow(10, pow); for(let i=0; i < length; i++) { array.push({ i }); } acc[pow] = array; return acc; }, {}); var array2 = arrays[2]; var array3 = arrays[3]; var array4 = arrays[4]; var array5 = arrays[5]; var array6 = arrays[6]; var array7 = arrays[7];
Tests:
10 ^ 2
array2.push({x: 1}); array2.shift();
10 ^ 3
array3.push({x: 1}); array3.shift();
10 ^ 4
array4.push({x: 1}); array4.shift();
10 ^ 5
array5.push({x: 1}); array5.shift();
10 ^ 6
array6.push({x: 1}); array6.shift();
10 ^ 7
array7.push({x: 1}); array7.shift();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (6)
Previous results
Fork
Test case name
Result
10 ^ 2
10 ^ 3
10 ^ 4
10 ^ 5
10 ^ 6
10 ^ 7
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!
Related benchmarks:
speed test lodash js
test sort lodash and JS
Comparing array.concat.apply short form with empty array vs array.flat vs array.reduce
Merge 3 small arrays
Comments
Confirm delete:
Do you really want to delete benchmark?