Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
Firefox 100
Windows
Desktop
2 years ago
Test name Executions per second
class without declared fields 6103.3 Ops/sec
class with declared fields 5520.6 Ops/sec
function constructor 6181.6 Ops/sec
object literal 176795.2 Ops/sec
object literal & sum.call 125269.2 Ops/sec
object literal & sum.bind 28811.7 Ops/sec
Object.create 6075.0 Ops/sec
Object.setPrototypeOf 8598.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