Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Mac OS X 10.15.7
Desktop
2 months ago
Test name Executions per second
Map<number, object> - Index Search 0.6 Ops/sec
Map<number, object> - Index Search #2 2.1 Ops/sec
Map<number, object> - Key Search 646.9 Ops/sec
Array<object> - Index Search 786.2 Ops/sec
Array<object> - Key Search 0.6 Ops/sec
Array<object> - Key Search #2 5.8 Ops/sec
HTMLCollection - Index Search 574.1 Ops/sec
HTMLCollection - Key Search 351.1 Ops/sec
{Array, Map} - Index Search 521.0 Ops/sec
{Array, Map} - Key Search 641.2 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


;