Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Mobile Safari/537.36
Chrome Mobile 121
Android
Mobile
9 months ago
Test name Executions per second
Public - ES6 property (get) 3768711.0 Ops/sec
Public - Getter function 4003704.8 Ops/sec
Public - Directly get 3342491.2 Ops/sec
Public - ES6 property (set) 8308737.0 Ops/sec
Public - Setter function 8332595.5 Ops/sec
Public - Directly set 8276636.0 Ops/sec
Private - ES6 property (get) 3374609.2 Ops/sec
Private - Getter function 3955109.8 Ops/sec
Private - ES6 property (set) 8317361.5 Ops/sec
Private - Setter function 8377498.5 Ops/sec
Closure - Getter function 8268309.5 Ops/sec
Closure - Setter function 8281168.0 Ops/sec
Script Preparation code:
Tests:
  • Public - ES6 property (get)

  • Public - Getter function

  • Public - Directly get

  • Public - ES6 property (set)

  • Public - Setter function

  • Public - Directly set

  • Private - ES6 property (get)

  • Private - Getter function

  • Private - ES6 property (set)

  • Private - Setter function

  • Closure - Getter function

  • Closure - Setter function


;