Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Mac OS X 10.15.7
Desktop
18 days ago
Test name Executions per second
Object.defineProperty 35693.4 Ops/sec
Object.assign (immutable) 741.1 Ops/sec
Object.assign (mutable) 33443.2 Ops/sec
Object.defineProperty on Proxy 29657.0 Ops/sec
Property direct on Proxy 18160.9 Ops/sec
Direct Object Property 108661.4 Ops/sec
Object.defineProperty with getter and setter 28696.8 Ops/sec
Object.defineProperties (plural) with getter and setter 13649.5 Ops/sec
Object.defineProperty on Proxy with getter and setter 25073.6 Ops/sec
Script Preparation code:
Tests:
  • Object.defineProperty

  • Object.assign (immutable)

  • Object.assign (mutable)

  • Object.defineProperty on Proxy

  • Property direct on Proxy

  • Direct Object Property

  • Object.defineProperty with getter and setter

  • Object.defineProperties (plural) with getter and setter

  • Object.defineProperty on Proxy with getter and setter

  • Object.assign on Proxy (mutable)