Run details:
Mozilla/5.0 (Linux; Android 11; SM-N975F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36
Chrome Mobile 94
Android
Mobile
3 years ago
Test name Executions per second
ES6 property (get) 2082210.8 Ops/sec
Getter function 2417871.8 Ops/sec
Directly get 2422069.8 Ops/sec
ES6 property (set) 5214357.5 Ops/sec
Setter function 5173999.0 Ops/sec
Directly set 4182417.5 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set