Script Preparation code:
AخA
 
var arr_small = Array.from({ length: 1000 }).map((_, i) => `test_val${i}`);
var arr_big = Array.from({ length: 1000000 }).map((_, i) => `test_val${i}`);
Tests:
  • stringify

     
    JSON.stringify(arr_small);
    JSON.stringify(arr_big);
  • join

     
    arr_small.join('');
    arr_big.join('');
  • toString

     
    arr_small.toString();
    arr_big.toString();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    stringify
    join
    toString

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0
Chrome 132 on Linux
View result in a separate tab
Test name Executions per second
stringify 18.9 Ops/sec
join 44.2 Ops/sec
toString 39.3 Ops/sec