Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Array insert
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/145.0.0.0 Safari/537.36
Browser:
Chrome 145
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
6 months ago
Benchmark engine:
Benchmark.js
set
22K/s
push
11K/s
push + reverse
10K/s
unshift
214/s
View exact numbers
Test name
Executions per second
✓
set
22,415 Ops/sec
push
11,008 Ops/sec
push + reverse
10,112 Ops/sec
unshift
214 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Tests:
push
const arr = [] for (let i = 0; i < 10000; i++) { arr.push(Math.random()) }
unshift
const arr = [] for (let i = 0; i < 10000; i++) { arr.unshift(Math.random()) }
set
const arr = new Array(10000) for (let i = 0; i < 10000; i++) { arr[i] = Math.random() }
push + reverse
const arr = [] for (let i = 0; i < 10000; i++) { arr.push(Math.random()) } const newArr = arr.reverse()