Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36
Chrome 80
Windows
Desktop
4 years ago
Test name Executions per second
ES6 property (get) 97137120.0 Ops/sec
Getter function 98530792.0 Ops/sec
Directly get 99040768.0 Ops/sec
ES6 property (set) 117750712.0 Ops/sec
Setter function 89704712.0 Ops/sec
Directly set 118396192.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set