Tests:
-
branchless
-
Math.min (cached)
-
Math.min (uncached)
-
Min w/ Ternary
-
Min w/ If
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
4 months ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7.2 Mobile/15E148 Safari/604.1
Mobile Safari 18 on iOS 18.7
View result in a separate tab
Math.min (cached)
90.9M/s
Math.min (uncached)
77.8M/s
View exact numbers
| Test name |
Executions per second |
|
✓
Math.min (cached)
|
90,934,264 Ops/sec |
|
Min w/ Ternary
|
83,542,584 Ops/sec |
|
branchless
|
81,803,656 Ops/sec |
|
Math.min (uncached)
|
77,834,704 Ops/sec |
|
Min w/ If
|
74,606,208 Ops/sec |
Do you really want to delete benchmark?