Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36
Chrome 80
Linux
Desktop
4 years ago
Test name Executions per second
ES6 property (get) 4053912.2 Ops/sec
Getter function 3943331.2 Ops/sec
Directly get 3974893.5 Ops/sec
ES6 property (set) 9088288.0 Ops/sec
Setter function 8987399.0 Ops/sec
Directly set 9149545.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set