Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
Firefox 126
Windows
Desktop
6 months ago
Test name Executions per second
class without declared fields 10772.2 Ops/sec
class with declared fields 4125.8 Ops/sec
function constructor 10448.5 Ops/sec
object literal 118306.2 Ops/sec
object literal & sum.call 68645.9 Ops/sec
object literal & sum.bind 40120.5 Ops/sec
Object.create 13759.0 Ops/sec
Object.setPrototypeOf 9101.1 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