Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Mac OS X 10.15.7
Desktop
10 months ago
Test name Executions per second
Array includes (first) 15018375.0 Ops/sec
Set has (first) 10967130.0 Ops/sec
Map has (first) 10872117.0 Ops/sec
Array includes (mid) 8886254.0 Ops/sec
Set has (mid) 14200633.0 Ops/sec
Map has (mid) 14100850.0 Ops/sec
Array includes (last) 6651759.0 Ops/sec
Set has (last) 14112494.0 Ops/sec
Map has (last) 14016691.0 Ops/sec
Script Preparation code:
Tests:
  • Array includes (first)

  • Set has (first)

  • Map has (first)

  • Array includes (mid)

  • Set has (mid)

  • Map has (mid)

  • Array includes (last)

  • Set has (last)

  • Map has (last)