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 35029.6 Ops/sec
Object.assign (immutable) 751.4 Ops/sec
Object.assign (mutable) 34905.1 Ops/sec
Object.defineProperty on Proxy 29976.1 Ops/sec
Property direct on Proxy 18953.4 Ops/sec
Direct Object Property 108966.8 Ops/sec
Object.defineProperty with getter and setter 28736.6 Ops/sec
Object.defineProperties (plural) with getter and setter 13942.4 Ops/sec
Object.defineProperty on Proxy with getter and setter 23641.7 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)