Run details:
Mozilla/5.0 (Linux; Android 8.1.0; Moto G (5S) Build/OPPS28.65-37-7-11; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.101 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/300.1.0.57.129;]
Chrome Mobile 87
Android 8.1.0
Mobile
3 years ago
Test name Executions per second
Math.max/min 275375.4 Ops/sec
if 115186520.0 Ops/sec
ternary 115379280.0 Ops/sec
Script Preparation code:
Tests:
  • Math.max/min

  • if

  • ternary