Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0
Firefox 117
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
class without declared fields 11023.0 Ops/sec
class with declared fields 4107.8 Ops/sec
function constructor 10584.5 Ops/sec
object literal 125031.6 Ops/sec
object literal & sum.call 70672.9 Ops/sec
object literal & sum.bind 43829.8 Ops/sec
Object.create 11202.9 Ops/sec
Object.setPrototypeOf 9111.3 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