Script Preparation code:
AخA
 
var array = new Array(5000).fill('1').map(() => Math.random());
var strJson = JSON.stringify(array);
var strComma = array.join(',');
Tests:
  • JSON.parse

     
    JSON.parse(strJson);
  • String.split

     
    strComma.split(',').map(Number)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    JSON.parse
    String.split

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/346.1.704810410 Mobile/15E148 Safari/604.1
Mobile Safari 18 on iOS 18.1
View result in a separate tab
Test name Executions per second
JSON.parse 2886.6 Ops/sec
String.split 2013.4 Ops/sec