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) 1660925.0 Ops/sec
Getter function 1808313.9 Ops/sec
Directly get 1967366.8 Ops/sec
ES6 property (set) 5269503.5 Ops/sec
Setter function 3832676.2 Ops/sec
Directly set 5291698.5 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set