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
Jump 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:
3 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
Test name
Executions per second
Array.from
8768.6 Ops/sec
Spread
7301.2 Ops/sec
Related benchmarks:
Array.from vs Spread with square
Array.from vs Spread with square and map
Array.from vs Spread 2
Array.from vs Spread really
Array.from vs Spread using Map
Array.from vs Spread and map
Array.from vs Spread Test
Array.from vs Spread new
Map Values Array.from vs Spread
Comments
Confirm delete:
Do you really want to delete benchmark?