Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Safari 17
Mac OS X 10.15.7
Desktop
17 days ago
Test name Executions per second
Object.defineProperty 86318.8 Ops/sec
Object.assign (immutable) 6037.5 Ops/sec
Object.assign (mutable) 71963.5 Ops/sec
Object.defineProperty on Proxy 65291.2 Ops/sec
Property direct on Proxy 62254.6 Ops/sec
Direct Object Property 151222.4 Ops/sec
Object.defineProperty with getter and setter 58085.9 Ops/sec
Object.defineProperties (plural) with getter and setter 44291.0 Ops/sec
Object.defineProperty on Proxy with getter and setter 48607.8 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)