Run details:
Mozilla/5.0 (iPad; CPU OS 15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/107.0.5304.66 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 107
iOS 15.6
Tablet
2 years ago
Test name Executions per second
ES6 property (get) 6322625.0 Ops/sec
Getter function 5300289.5 Ops/sec
Directly get 6406900.5 Ops/sec
ES6 property (set) 14022785.0 Ops/sec
Setter function 14221813.0 Ops/sec
Directly set 14443030.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set