Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Chrome 105
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Math.Min 1244.3 Ops/sec
Math.Max 1394.1 Ops/sec
Reduce for min 1403.6 Ops/sec
Reduce for max 1403.1 Ops/sec
For for min 265.6 Ops/sec
For for max 266.3 Ops/sec
For of for min 307.0 Ops/sec
For of for max 310.9 Ops/sec
MinMaxFor 88.8 Ops/sec
MinMaxFunctions 39.2 Ops/sec
Math.MinMax 616.2 Ops/sec
Reducer 69.6 Ops/sec
Script Preparation code:
Tests:
  • Math.Min

  • Math.Max

  • Reduce for min

  • Reduce for max

  • For for min

  • For for max

  • For of for min

  • For of for max

  • MinMaxFor

  • MinMaxFunctions

  • Math.MinMax

  • Reducer


;