Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array.from vs Spread (Map) v. really?
(version: 1)
Comparing performance of:
Array.from vs Spread
Created:
one year ago
by:
Guest
Go to the latest result
Tests:
Array.from
var fooSet = new Map(); for(var i=0;i<2000;i++) { fooSet.set(i, {}); } var other = Array.from(fooSet.values());
Spread
var fooSet = new Map(); for(var i=0;i<2000;i++) { fooSet.set(i, {}); } var other = [...fooSet.values()];
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array.from
Spread
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (Android 15; Mobile; rv:147.0) Gecko/147.0 Firefox/147.0
Browser/OS:
Firefox Mobile 147 on Android
View result in a separate tab
Embed
Embed Benchmark Result
Array.from
9K/s
Spread
7K/s
View exact numbers
Test name
Executions per second
✓
Array.from
8,769 Ops/sec
Spread
7,301 Ops/sec
Related benchmarks
Array.from vs Spread with square and map
Array.from vs Spread really
Array.from vs Spread and map
Comments
Confirm delete:
Do you really want to delete benchmark?