Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Firefox 128
Linux
Desktop
28 days ago
Test name Executions per second
ES6 Class 12517496.0 Ops/sec
Function Prototype 11917467.0 Ops/sec
Object Literal 292879.5 Ops/sec
ES6 Class with private properties 1153396.6 Ops/sec
ES6 class with inheritance 10541821.0 Ops/sec
ES6 class with inheritance and private fields declared 1144289.5 Ops/sec
Function prototype with inheritance 10432523.0 Ops/sec
Script Preparation code:
Tests:
  • ES6 Class

  • Function Prototype

  • Object Literal

  • ES6 Class with private properties

  • ES6 class with inheritance

  • ES6 class with inheritance and private fields declared

  • Function prototype with inheritance