Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
constant callback vs fill
(version: 1)
Comparing performance of:
fill vs constant callback
Created:
24 days ago
by:
Guest
Jump to the latest result
Tests:
fill
for(let i = 300; i--;)console.log(Array.from({ length: 1000 }).fill(''))
constant callback
for(let i = 300; i--;)console.log(Array.from({ length: 1000 }, () => ''))
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
fill
constant callback
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
24 days ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0
Browser/OS:
Firefox 151 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
fill
642.6 Ops/sec
constant callback
476.8 Ops/sec
Related benchmarks:
fill array with value: map(callback) vs fill(value)
Array fill method vs for loop_
Array fill method vs for loop__
for vs new Array.fill
for vs new Array.fill v2
Array(length).fill() vs Array.from({ length: length })
Array() vs new Array() fill
Array() vs Array.from() fill
fill array with value: map(callback) vs fill(value) 2
Comments
Confirm delete:
Do you really want to delete benchmark?