Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/96.0.4664.116 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 96
iOS 14.2
Mobile
2 years ago
Test name Executions per second
ES6 property (get) 7728319.5 Ops/sec
Getter function 7751285.5 Ops/sec
Directly get 7716311.5 Ops/sec
ES6 property (set) 17360198.0 Ops/sec
Setter function 14797468.0 Ops/sec
Directly set 12581713.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set