Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
Chrome 89
Linux
Desktop
3 years ago
Test name Executions per second
ES6 property (get) 5657181.0 Ops/sec
Getter function 5559776.0 Ops/sec
Directly get 5690899.0 Ops/sec
ES6 property (set) 15386400.0 Ops/sec
Setter function 15506480.0 Ops/sec
Directly set 15740230.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set