Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Populate array: array literal vs array constructor
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_5_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/143.0.7499.92 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 143
Operating system:
iOS 18.5.0
Device Platform:
Mobile
Date tested:
9 months ago
Benchmark engine:
Benchmark.js
Array literal
419.6M/s
Array constructor
22.1M/s
View exact numbers
Test name
Executions per second
✓
Array literal
419,648,000 Ops/sec
Array constructor
22,108,078 Ops/sec
Tests:
Array constructor
const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]; const arrayConstructor = new Array(...numbers);
Array literal
const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]; const arrayLiteral = [...numbers];