Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Windows 7
Desktop
one year ago
Test name Executions per second
ES6 property (get) 4768031.0 Ops/sec
Getter function 4819209.5 Ops/sec
Directly get 4791071.5 Ops/sec
ES6 property (set) 11177444.0 Ops/sec
Setter function 11124674.0 Ops/sec
Directly set 11089195.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set


;