Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Set: Array.from vs Spread (1 million)
(version: 1)
Comparing performance of:
Array.from vs S[read
Created:
6 days ago
by:
Guest
Go to the latest result
Script Preparation code:
var setObj = new Set; for (let i = 0; i < 1_000_000; ++i) { setObj.add(i); } var res = [];
Tests:
Array.from
res = Array.from(setObj);
S[read
res = [...setObj];
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array.from
S[read
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 days ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0
Browser/OS:
Chrome 150 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Array.from
587/s
S[read
565/s
View exact numbers
Test name
Executions per second
✓
Array.from
587 Ops/sec
S[read
565 Ops/sec
Related benchmarks
Set: Array.from vs Spread
Array.from vs Spread (only)
Array.from() vs Spread with 10K elements
Array.from vs Spread 100,000
Comments
Confirm delete:
Do you really want to delete benchmark?