Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15
Safari 16
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Map.get 13717147.0 Ops/sec
WeakMap.get 12806562.0 Ops/sec
array[0] 12965591.0 Ops/sec
object.a 9325920.0 Ops/sec
object[symbol] 6892939.5 Ops/sec
object[“0”] 9292816.0 Ops/sec
Script Preparation code:
Tests:
  • Map.get

  • WeakMap.get

  • array[0]

  • object.a

  • object[symbol]

  • object[“0”]