Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Mapping arrayike
(version: 1)
Comparing performance of:
Array.from vs .map.call
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div><div>hello></div>
Script Preparation code:
let o = document.getElementsByTagName('div') function map(o) { return o.textContent}
Tests:
Array.from
Array.from(o,map)
.map.call
[].map.call(o,map)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array.from
.map.call
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser/OS:
Chrome 132 on Chrome OS 14541.0.0
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array.from
52013.9 Ops/sec
.map.call
61443.9 Ops/sec
Related benchmarks:
test1_Has_Is
array.from vs array slice with querySelectorAll
Array.from vs Spread on querySelectorAll
TestJSIntl
appendChild vs. insertAdjacentHTML
appendChild vs. insertAdjacentHTML x1000
appendChild v. insertAdjacentHTML
replaceChildren vs removechild
textContent vs replaceChildren divs
Comments
Confirm delete:
Do you really want to delete benchmark?