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 782.1 Ops/sec
Obj insert 553.5 Ops/sec
Map delete 11456.3 Ops/sec
Obj delete using delete 10189.3 Ops/sec
Extra: Object delete assimiling undefined 4148.4 Ops/sec
Map lookup 12792.3 Ops/sec
Object lookup 10411.2 Ops/sec
Map check 12578.3 Ops/sec
Object check(key in) non-secure 9942.3 Ops/sec
Object check using hasOwnProperty 9219.3 Ops/sec
Object check using hasOwnProperty secure implementation 4018.6 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