Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137
Android
Desktop
one year ago
Test name Executions per second
ES6 property (get) 2306245.2 Ops/sec
Getter function 2163314.0 Ops/sec
Directly get 2244452.2 Ops/sec
ES6 property (set) 51528884.0 Ops/sec
Setter function 54752500.0 Ops/sec
Directly set 59716924.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 property (get)

  • Getter function

  • Directly get

  • ES6 property (set)

  • Setter function

  • Directly set