Map vs Property Accessor

one month ago
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36
Test name Executions per second
Class with Getters 90536.9 Ops/sec
Class with Props in Map 9377.5 Ops/sec
Script Preparation code:
Tests:
  • Class with Getters

  • Class with Props in Map

Open this result on MeasureThat.net