Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Chrome 94
Windows
Desktop
3 years ago
Test name Executions per second
Map insert 838.5 Ops/sec
Obj insert 626.5 Ops/sec
Map delete 11484.5 Ops/sec
Obj delete using delete 10178.0 Ops/sec
Extra: Object delete assimiling undefined 4158.6 Ops/sec
Map lookup 12427.8 Ops/sec
Object lookup 10422.7 Ops/sec
Map check 11044.7 Ops/sec
Object check(key in) non-secure 9919.8 Ops/sec
Object check using hasOwnProperty 9643.5 Ops/sec
Object check using hasOwnProperty secure implementation 3620.1 Ops/sec
Script Preparation code:
Tests:
  • Map insert

  • Obj insert

  • Map delete

  • Obj delete using delete

  • Extra: Object delete assimiling undefined

  • Map lookup

  • Object lookup

  • Map check

  • Object check(key in) non-secure

  • Object check using hasOwnProperty

  • Object check using hasOwnProperty secure implementation