Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36
Chrome Mobile 130
Android
Mobile
2 months ago
Test name Executions per second
ES6 property (get) 4930881.0 Ops/sec
Getter function 5407388.5 Ops/sec
Directly get 4763529.0 Ops/sec
ES6 property (set) 10046430.0 Ops/sec
Setter function 10973720.0 Ops/sec
Directly set 11399252.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set