Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36
Chrome 101
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Map insert 1169.1 Ops/sec
Obj insert 1110.8 Ops/sec
Map delete 23926.9 Ops/sec
Obj delete using delete 17133.8 Ops/sec
Extra: Object delete assimiling undefined 5448.7 Ops/sec
Map lookup 26764.9 Ops/sec
Object lookup 20476.3 Ops/sec
Map check 26678.5 Ops/sec
Object check(key in) non-secure 20513.0 Ops/sec
Object check using hasOwnProperty 18333.2 Ops/sec
Object check using hasOwnProperty secure implementation 8257.8 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