Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Add new element to array: push vs array[array.length]
Add new element to array: push vs array[array.length]
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 130
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Benchmark engine:
Benchmark.js
array[array.length]
55.7M/s
Push
52.5M/s
View exact numbers
Test name
Executions per second
✓
array[array.length]
55,667,176 Ops/sec
Push
52,466,484 Ops/sec
Tests:
Push
var params = [ "hello", true, 7 ]; params.push('new');
array[array.length]
var params = [ "hello", true, 7 ]; params[params.length] = 'new';