Script Preparation code:
Tests:

Historical Performance Data aggregated from 74 community runs

Desktop Results:
Chrome 56 runs
if
56.2M/s
ternary
55.5M/s
Math.max/min
29.2M/s

Fastest: if (1.9x faster)

View exact numbers
  • if: 56,248,016 ops/sec
  • ternary: 55,467,204 ops/sec
  • Math.max/min: 29,220,108 ops/sec
Firefox 18 runs
if
911.8M/s
ternary
901.3M/s
Math.max/min
56.1M/s

Fastest: if (16.3x faster)

View exact numbers
  • if: 911,841,856 ops/sec
  • ternary: 901,265,024 ops/sec
  • Math.max/min: 56,065,112 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/min
    if
    ternary

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0
Chrome 150 on Windows
View result in a separate tab
Math.max/min
178.5M/s
ternary
175.9M/s
if
174.4M/s
View exact numbers
Test name Executions per second
Math.max/min 178,469,408 Ops/sec
ternary 175,878,240 Ops/sec
if 174,379,344 Ops/sec