Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 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 43152.7 Ops/sec
class with declared fields 48616.9 Ops/sec
function constructor 43305.6 Ops/sec
object literal 682404.2 Ops/sec
object literal & sum.call 776168.6 Ops/sec
object literal & sum.bind 24597.5 Ops/sec
Object.create 2358.8 Ops/sec
Object.setPrototypeOf 2317.7 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