Script Preparation code:
Tests:

Historical Performance Data aggregated from 34 community runs

Desktop Results:
Chrome 34 runs
optional chaining (?.)
28.4M/s
&&
16.2M/s

Fastest: optional chaining (?.) (1.8x faster)

View exact numbers
  • optional chaining (?.): 28,416,814 ops/sec
  • &&: 16,168,194 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
    &&
    optional chaining (?.)

    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/145.0.0.0 Safari/537.36
Chrome 145 on Windows
View result in a separate tab
optional chaining (?.)
57.5M/s
&&
52.7M/s
View exact numbers
Test name Executions per second
optional chaining (?.) 57,538,000 Ops/sec
&& 52,663,280 Ops/sec