Run details:
Mozilla/5.0 (Android 13; Mobile; rv:125.0) Gecko/125.0 Firefox/125.0
Firefox Mobile 125
Android
Mobile
9 months ago
Test name Executions per second
Public - ES6 property (get) 290234048.0 Ops/sec
Public - Getter function 288836672.0 Ops/sec
Public - Directly get 287675232.0 Ops/sec
Public - ES6 property (set) 384085888.0 Ops/sec
Public - Setter function 421355872.0 Ops/sec
Public - Directly set 384548480.0 Ops/sec
Private - ES6 property (get) 256198144.0 Ops/sec
Private - Getter function 288772736.0 Ops/sec
Private - ES6 property (set) 381619552.0 Ops/sec
Private - Setter function 386007904.0 Ops/sec
Closure - Getter function 574597696.0 Ops/sec
Closure - Setter function 327306624.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


;