Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0
Chrome 119
Windows
Desktop
one year ago
Test name Executions per second
Array.find, 3 elements 1176284.6 Ops/sec
Map.get, 3 elements 1132418.9 Ops/sec
Array.find, 10 elements 685130.9 Ops/sec
Map.get, 10 elements 969429.2 Ops/sec
Clone array 3 2325328.5 Ops/sec
Clone map 3 1150065.5 Ops/sec
Clone array 10 2323130.5 Ops/sec
Clone map 10 554955.6 Ops/sec
Script Preparation code:
Tests:
  • Array.find, 3 elements

  • Map.get, 3 elements

  • Array.find, 10 elements

  • Map.get, 10 elements

  • Clone array 3

  • Clone map 3

  • Clone array 10

  • Clone map 10