ES6 Class vs Function Prototype vs Object LiteralFastest: ES6 Class (11.6x faster)
12,711,162 ops/sec
6,287,924 ops/sec
1,092,525 ops/sec
Fastest: ES6 Class (27.3x faster)
19,553,644 ops/sec
18,700,838 ops/sec
715,033 ops/sec
Fastest: ES6 Class (6.6x faster)
3,855,871 ops/sec
3,156,198 ops/sec
584,857 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| ES6 Class | |
| Function Prototype | |
| Object Literal |
| Test name | Executions per second |
|---|---|
| ✓ Function Prototype | 22,162,594 Ops/sec |
| ES6 Class | 21,219,564 Ops/sec |
| Object Literal | 564,841 Ops/sec |