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; rv:140.0) Gecko/20100101 Firefox/140.0
Browser:
Firefox 140
Operating system:
Linux
Device Platform:
Desktop
Date tested:
9 months ago
Test name
Executions per second
Array.fill
49.7 Ops/sec
Array.push
51.8 Ops/sec
String.repeat
3764380.2 Ops/sec
Array.set
6.3 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"