Script Preparation code:
Tests:

Historical Performance Data aggregated from 95 community runs

Desktop Results:
Chrome 69 runs
array.toSorted
494/s
[...array].sort
469/s
View exact numbers
  • array.toSorted: 494 ops/sec
  • [...array].sort: 469 ops/sec
Firefox 26 runs
array.toSorted
941/s
[...array].sort
920/s
View exact numbers
  • array.toSorted: 941 ops/sec
  • [...array].sort: 920 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    [...array].sort
    array.toSorted

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0
Firefox 128 on Windows
View result in a separate tab
[...array].sort
197/s
array.toSorted
192/s
View exact numbers
Test name Executions per second
[...array].sort 197 Ops/sec
array.toSorted 192 Ops/sec