Script Preparation code:
AخA
 
var items = [{
        val: 7
    },
    {
        val: 9
    },
    {
        val: 8
    },
    {
        val: 3
    },
    {
        val: 12
    },
    {
        val: 34
    },
    {
        val: 7
    },
    {
        val: 512
    }
]
Tests:
  • Map and Math.min

     
    Math.min(...items.map(item => item.val))
  • Reduce without initial value

     
    items.reduce((acc, current) => acc < current.val ? acc : current.val)
  • Reduce with initial value

     
    items.reduce((acc, current) => acc < current.val ? acc : current.val, items[0].val)
  • Reduce without initial value 2

     
    items.reduce((acc, current) => acc > current.val ? current.val : acc)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Map and Math.min
    Reduce without initial value
    Reduce with initial value
    Reduce without initial value 2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
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 on Mac OS X 10.15.4
View result in a separate tab
Test name Executions per second
Map and Math.min 3553170.2 Ops/sec
Reduce without initial value 5112774.0 Ops/sec
Reduce with initial value 3686865.5 Ops/sec
Reduce without initial value 2 1440307.1 Ops/sec