Script Preparation code:
AخA
 
var s1 = "foobar";
var s2 = "foo";
Tests:
  • Array.split

     
    var n1 = s1.split("");
    var n2 = s2.split("");
  • Array.from

     
    var n1 = Array.from(s1);
    var n2 = Array.from(s2);
  • Spread

     
    var n1 = [...s1];
    var n2 = [...s2];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.split
    Array.from
    Spread

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Array.split 36701380.0 Ops/sec
Array.from 23116464.0 Ops/sec
Spread 23342948.0 Ops/sec