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
2 years ago
Test name Executions per second
ES6 property (get) 2082211.0 Ops/sec
Getter function 2417872.0 Ops/sec
Directly get 2422070.0 Ops/sec
ES6 property (set) 5214358.0 Ops/sec
Setter function 5173999.0 Ops/sec
Directly set 4182418.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set