Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1
Mobile Safari 17
iOS 17.6.1
Mobile
3 months ago
Test name Executions per second
ES6 property (get) 9678146.0 Ops/sec
Getter function 9486736.0 Ops/sec
Directly get 9684349.0 Ops/sec
ES6 property (set) 23785602.0 Ops/sec
Setter function 23482540.0 Ops/sec
Directly set 23425302.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set