Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36
Chrome 86
Windows
Desktop
4 years ago
Test name Executions per second
ES6 property (get) 3327296.8 Ops/sec
Getter function 3460475.8 Ops/sec
Directly get 3470922.5 Ops/sec
ES6 property (set) 8176102.5 Ops/sec
Setter function 7013322.5 Ops/sec
Directly set 8153050.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set


;