Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.44
Chrome 111
Linux
Desktop
one year ago
Test name Executions per second
ES6 property (get) 8337118.0 Ops/sec
Getter function 8252755.0 Ops/sec
Directly get 8217337.0 Ops/sec
ES6 property (set) 19086990.0 Ops/sec
Setter function 19196700.0 Ops/sec
Directly set 19093160.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set