Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.9 Safari/537.36 OPR/82.0.4218.0 (Edition developer)
Opera 82
Windows
Desktop
3 years ago
Test name Executions per second
ES6 property (get) 3993707.0 Ops/sec
Getter function 3995390.8 Ops/sec
Directly get 3987476.2 Ops/sec
ES6 property (set) 8556852.0 Ops/sec
Setter function 8374316.0 Ops/sec
Directly set 8555521.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set