Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Chrome 84
Mac OS X 10.15.4
Desktop
4 years ago
Test name Executions per second
Map and Math.min 3617132.5 Ops/sec
Reduce without initial value 5092262.0 Ops/sec
Reduce with initial value 3695223.5 Ops/sec
Sort and get first element 3233399.0 Ops/sec
Script Preparation code:
Tests:
  • Map and Math.min

  • Reduce without initial value

  • Reduce with initial value

  • Sort and get first element