Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Firefox 128
Linux
Desktop
one year ago
ES6 Class
12.5M/s
Function Prototype
11.9M/s
ES6 class with inheritance
10.5M/s
Function prototype with inheritance
10.4M/s
ES6 Class with private properties
1.2M/s
ES6 class with inheritance and private fields declared
1.1M/s
Object Literal
293K/s
View exact numbers
Test name Executions per second
ES6 Class 12,517,496 Ops/sec
Function Prototype 11,917,467 Ops/sec
ES6 class with inheritance 10,541,821 Ops/sec
Function prototype with inheritance 10,432,523 Ops/sec
ES6 Class with private properties 1,153,397 Ops/sec
ES6 class with inheritance and private fields declared 1,144,290 Ops/sec
Object Literal 292,880 Ops/sec
Script Preparation code:
Tests: