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
17 days ago
Test name Executions per second
Object.defineProperty 33060.0 Ops/sec
Object.assign (immutable) 738.5 Ops/sec
Object.assign (mutable) 33252.7 Ops/sec
Object.defineProperty on Proxy 14367.4 Ops/sec
Property direct on Proxy 22765.9 Ops/sec
Direct Object Property 90693.8 Ops/sec
Object.defineProperty with getter and setter 27220.9 Ops/sec
Object.defineProperties (plural) with getter and setter 12329.4 Ops/sec
Object.defineProperty on Proxy with getter and setter 13138.0 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)