Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array.fill vs Array.push vs String.repeat vs Array.set
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Browser:
Chrome 138
Operating system:
Linux
Device Platform:
Desktop
Date tested:
9 months ago
Test name
Executions per second
Array.fill
80.2 Ops/sec
Array.push
27.8 Ops/sec
String.repeat
3522931.5 Ops/sec
Array.set
5.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Tests:
Array.fill
var array = Array(1920*1080).fill("\u001b[0m")
Array.push
var array = [] for (let i = 1920 * 1080; i > 0; i--) array.push("\u001b[0m")
String.repeat
var repeat = "\u001b[0m".repeat(1920 * 1080)
Array.set
var array = Array(1920*1080) for (let i = 1920 * 1080; i > 0; i--) array[i] = "\u001b[0m"