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:
2 months ago
by:
Guest
Go 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:
2 months 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
fill
643/s
constant callback
477/s
View exact numbers
Test name
Executions per second
✓
fill
643 Ops/sec
constant callback
477 Ops/sec
Related benchmarks
Array fill method vs for loop__
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?