Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome 87
Windows
Desktop
3 years ago
Test name Executions per second
ES6 property (get) 3452434.0 Ops/sec
Getter function 3556007.2 Ops/sec
Directly get 3555013.5 Ops/sec
ES6 property (set) 8942443.0 Ops/sec
Setter function 8722878.0 Ops/sec
Directly set 8015145.5 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set