Array.from vs array spread

Benchmark created on


Setup


Test runner

Ready to run.

Testing in
TestOps/sec
Array.from
Array.from({length: 20})
ready
Array spread
[...Array(20)]
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.