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 6164.2 Ops/sec
class with declared fields 5547.4 Ops/sec
function constructor 6139.3 Ops/sec
object literal 179710.4 Ops/sec
object literal & sum.call 127750.9 Ops/sec
object literal & sum.bind 28619.3 Ops/sec
Object.create 6077.2 Ops/sec
Object.setPrototypeOf 8550.2 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