Script Preparation code:
Tests:

Historical Performance Data aggregated from 22 community runs

Desktop Results:
Chrome 22 runs
Math.max
50.2M/s
If
49.0M/s
Ternary
47.2M/s
View exact numbers
  • Math.max: 50,238,968 ops/sec
  • If: 48,960,484 ops/sec
  • Ternary: 47,202,620 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
    Math.max
    If
    Ternary

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Edg/147.0.0.0
Chrome 147 on Windows
View result in a separate tab
If
74.7M/s
Math.max
73.4M/s
Ternary
64.1M/s
View exact numbers
Test name Executions per second
If 74,676,576 Ops/sec
Math.max 73,443,288 Ops/sec
Ternary 64,096,936 Ops/sec