Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1
Mobile Safari 15
iOS 15.4.1
Mobile
one year ago
Test name Executions per second
class without declared fields 45673.9 Ops/sec
class with declared fields 48588.3 Ops/sec
function constructor 37450.2 Ops/sec
object literal 492268.1 Ops/sec
object literal & sum.call 796748.6 Ops/sec
object literal & sum.bind 17137.1 Ops/sec
Object.create 3948.2 Ops/sec
Object.setPrototypeOf 3111.3 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