Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array.from vs Spread v2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0
Browser:
Firefox 151
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 months ago
Array.from
80K/s
Spread
66K/s
View exact numbers
Test name
Executions per second
✓
Array.from
79,549 Ops/sec
Spread
65,556 Ops/sec
Script Preparation code:
var fooSet = new Set(); for (var i = 0; i < 1000; i++) { fooSet.add(i); }
Tests:
Array.from
var other = Array.from(fooSet);
Spread
var other = [...fooSet];