Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0
Firefox 108
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
ES6 property (get) 788365696.0 Ops/sec
Getter function 784435840.0 Ops/sec
Directly get 789325312.0 Ops/sec
ES6 property (set) 1264415744.0 Ops/sec
Setter function 1266868224.0 Ops/sec
Directly set 1258768256.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set