Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
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:
5 months ago
Test name
Executions per second
Array constructor
22108078.0 Ops/sec
Array literal
419648000.0 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];