Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.78
Chrome 109
Windows
Desktop
one year ago
Test name Executions per second
ES6 property (get) 4612580.0 Ops/sec
Getter function 4758473.5 Ops/sec
Directly get 4848476.5 Ops/sec
ES6 property (set) 11194410.0 Ops/sec
Setter function 11316777.0 Ops/sec
Directly set 11959159.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set