Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Mobile/15E148 Safari/604.1
Mobile Safari 14
iOS 14.6
Mobile
3 years ago
Test name Executions per second
ES6 property (get) 9013939.0 Ops/sec
Getter function 9003798.0 Ops/sec
Directly get 9019420.0 Ops/sec
ES6 property (set) 20691930.0 Ops/sec
Setter function 22054372.0 Ops/sec
Directly set 20694392.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set