ES6 Class vs Function Prototype vs Object LiteralFastest: ES6 Class (2.7x faster)
18,437 ops/sec
14,680 ops/sec
6,765 ops/sec
Fastest: ES6 Class (2.5x faster)
10,336 ops/sec
8,675 ops/sec
4,068 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 | 6,608 Ops/sec |
| ES6 Class | 6,534 Ops/sec |
| Object Literal | 4,626 Ops/sec |