Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0
Firefox 121
Linux
Desktop
one year ago
Test name Executions per second
Array.from 954507.1 Ops/sec
Spread 970427.4 Ops/sec
Script Preparation code:
AخA
 
var arr = [];
for(var i=0;i<100;i++) {
  arr.push(i);
}
Tests:
  • Array.from

     
    var other = Array.from(arr);
  • Spread

     
    var other = [...arr];