Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0
Chrome 128
Windows
Desktop
2 months ago
Test name Executions per second
Map<number, object> - Index Search 0.2 Ops/sec
Map<number, object> - Index Search #2 1.1 Ops/sec
Map<number, object> - Key Search 286.5 Ops/sec
Array<object> - Index Search 308.7 Ops/sec
Array<object> - Key Search 0.2 Ops/sec
Array<object> - Key Search #2 4.1 Ops/sec
HTMLCollection - Index Search 231.3 Ops/sec
HTMLCollection - Key Search 148.2 Ops/sec
{Array, Map} - Index Search 235.8 Ops/sec
{Array, Map} - Key Search 290.7 Ops/sec
Script Preparation code:
Tests:
  • Map<number, object> - Index Search

  • Map<number, object> - Index Search #2

  • Map<number, object> - Key Search

  • Array<object> - Index Search

  • Array<object> - Key Search

  • Array<object> - Key Search #2

  • HTMLCollection - Index Search

  • HTMLCollection - Key Search

  • {Array, Map} - Index Search

  • {Array, Map} - Key Search


;