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 1262.6 Ops/sec
Math.Max 1476.7 Ops/sec
Reduce for min 1444.1 Ops/sec
Reduce for max 1426.6 Ops/sec
For for min 274.4 Ops/sec
For for max 275.4 Ops/sec
For of for min 309.7 Ops/sec
For of for max 255.6 Ops/sec
MinMaxFor 83.6 Ops/sec
MinMaxFunctions 41.5 Ops/sec
Math.MinMax 645.9 Ops/sec
Reducer 73.4 Ops/sec
Sorting 80.1 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

  • Sorting


;