Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Mac OS X 10.15.7
Desktop
2 years ago
Benchmark.js
With ternary operator #2
125.5M/s
With inline statements
124.3M/s
With ternary operator #1
120.6M/s
With if statements
90.2M/s
With min() and max()
4.5M/s
View exact numbers
Test name Executions per second
With ternary operator #2 125,487,432 Ops/sec
With inline statements 124,298,032 Ops/sec
With ternary operator #1 120,568,472 Ops/sec
With if statements 90,177,784 Ops/sec
With min() and max() 4,502,640 Ops/sec
Tests: