Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.43
Chrome 117
Windows
Desktop
one year ago
Test name Executions per second
Array.find, 100 elementos 1769164.9 Ops/sec
Array.find, 10 000 elementos 92654.4 Ops/sec
Array.find, 1 000 000 elementos 210.0 Ops/sec
Array to Map + Map.get, 100 elementos 220647.2 Ops/sec
Array to Map + Map.get, 10 000 elementos 1350.6 Ops/sec
Array to Map + Map.get, 1 000 000 elementos 4.8 Ops/sec
Array.find, TINY, 10 buscas 188608.4 Ops/sec
Array to Map + Map.get, TINY, 10 buscas 132497.9 Ops/sec
Array.find, SMALL, 100 buscas 1335.3 Ops/sec
Array to Map + Map.get, SMALL, 100 buscas 1385.4 Ops/sec
Script Preparation code:
Tests:
  • Array.find, 100 elementos

  • Array.find, 10 000 elementos

  • Array.find, 1 000 000 elementos

  • Array to Map + Map.get, 100 elementos

  • Array to Map + Map.get, 10 000 elementos

  • Array to Map + Map.get, 1 000 000 elementos

  • Array.find, TINY, 10 buscas

  • Array to Map + Map.get, TINY, 10 buscas

  • Array.find, SMALL, 100 buscas

  • Array to Map + Map.get, SMALL, 100 buscas

  • Array.find, SMALL, 1000 buscas

  • Array to Map + Map.get, SMALL, 1000 buscas


;