Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15
Safari 16
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
class without declared fields 30592.3 Ops/sec
class with declared fields 36644.9 Ops/sec
function constructor 50653.5 Ops/sec
object literal 813580.2 Ops/sec
object literal & sum.call 506406.1 Ops/sec
object literal & sum.bind 21468.7 Ops/sec
Object.create 1344.4 Ops/sec
Object.setPrototypeOf 3307.5 Ops/sec
Script Preparation code:
Tests:
  • class without declared fields

  • class with declared fields

  • function constructor

  • object literal

  • object literal & sum.call

  • object literal & sum.bind

  • Object.create

  • Object.setPrototypeOf