Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Windows
Desktop
one year ago
Test name Executions per second
class without declared fields 14963.3 Ops/sec
class with declared fields 1529.1 Ops/sec
function constructor 14941.4 Ops/sec
object literal 1092158.5 Ops/sec
object literal & sum.call 1100824.6 Ops/sec
object literal & sum.bind 69399.5 Ops/sec
Object.create 4844.1 Ops/sec
Object.setPrototypeOf 983.7 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