Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
Firefox 116
Linux
Desktop
one year ago
Test name Executions per second
class without declared fields 6016.2 Ops/sec
class with declared fields 2660.6 Ops/sec
function constructor 6657.3 Ops/sec
object literal 60917.3 Ops/sec
object literal & sum.call 36590.5 Ops/sec
object literal & sum.bind 23785.2 Ops/sec
Object.create 7113.7 Ops/sec
Object.setPrototypeOf 6002.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