Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
push vs index123
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/143.0.0.0 Safari/537.36
Browser:
Chrome 143
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
8 months ago
Array.push
2.2M/s
Array[index]
2.1M/s
View exact numbers
Test name
Executions per second
✓
Array.push
2,152,859 Ops/sec
Array[index]
2,125,299 Ops/sec
Tests:
Array.push
const elements = document.all; const amount = elements.length; const arr = []; for (let i = 0; i < amount; i += 1) arr.push(elements[i]);
Array[index]
const elements = document.all; const amount = elements.length; const arr = []; for (let i = 0; i < amount; i += 1) arr[i] = elements[i];