Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Mac OS X 10.15.7
Desktop
10 months ago
Test name Executions per second
class without declared fields 31707.8 Ops/sec
class with declared fields 5488.8 Ops/sec
function constructor 31277.7 Ops/sec
object literal 1786985.4 Ops/sec
object literal & sum.call 1775935.4 Ops/sec
object literal & sum.bind 145346.2 Ops/sec
Object.create 12486.9 Ops/sec
Object.setPrototypeOf 2699.4 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