Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
Firefox 119
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
class without declared fields 12260.4 Ops/sec
class with declared fields 5827.9 Ops/sec
function constructor 12422.5 Ops/sec
object literal 195049.3 Ops/sec
object literal & sum.call 111316.7 Ops/sec
object literal & sum.bind 68178.6 Ops/sec
Object.create 19318.3 Ops/sec
Object.setPrototypeOf 14110.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