Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0
Firefox 97
Windows 7
Desktop
2 years ago
Test name Executions per second
class without declared fields 2363.6 Ops/sec
class with declared fields 1905.7 Ops/sec
function constructor 2384.6 Ops/sec
object literal 70347.8 Ops/sec
object literal & sum.call 43371.4 Ops/sec
object literal & sum.bind 10752.6 Ops/sec
Object.create 2577.1 Ops/sec
Object.setPrototypeOf 3778.5 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