Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0
Firefox 96
Ubuntu
Desktop
2 years ago
Test name Executions per second
ES6 property (get) 632920576.0 Ops/sec
Getter function 609855680.0 Ops/sec
Directly get 597754944.0 Ops/sec
ES6 property (set) 892968384.0 Ops/sec
Setter function 874932992.0 Ops/sec
Directly set 862440704.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set