Run details:
Mozilla/5.0 (Linux; Android 10; CLT-L29) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Mobile Safari/537.36
Chrome Mobile 89
Android
Mobile
3 years ago
Test name Executions per second
ES6 property (get) 1341809.0 Ops/sec
Getter function 1000959.0 Ops/sec
Directly get 1234408.0 Ops/sec
ES6 property (set) 2611160.0 Ops/sec
Setter function 2197333.0 Ops/sec
Directly set 2820868.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set