Script Preparation code:
Tests:

Historical Performance Data aggregated from 16 community runs

Desktop Results:
Chrome 10 runs
array length = 0
17.7M/s
array = []
7.9M/s

Fastest: array length = 0 (2.2x faster)

View exact numbers
  • array length = 0: 17,673,226 ops/sec
  • array = []: 7,879,055 ops/sec
Firefox 6 runs
array = []
111.3M/s
array length = 0
45.7M/s

Fastest: array = [] (2.4x faster)

View exact numbers
  • array = []: 111,264,496 ops/sec
  • array length = 0: 45,674,008 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 length = 0
    array = []

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Chrome 144 on Windows
View result in a separate tab
array length = 0
18.5M/s
array = []
5.8M/s
View exact numbers
Test name Executions per second
array length = 0 18,496,626 Ops/sec
array = [] 5,769,134 Ops/sec