Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.6.1
Mobile
one year ago
Test name Executions per second
class without declared fields 37371.3 Ops/sec
class with declared fields 39623.8 Ops/sec
function constructor 36872.2 Ops/sec
object literal 655052.5 Ops/sec
object literal & sum.call 657259.4 Ops/sec
object literal & sum.bind 14234.5 Ops/sec
Object.create 2529.1 Ops/sec
Object.setPrototypeOf 2663.4 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