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 (25.9x faster)
20,257,692 ops/sec
19,020,324 ops/sec
780,648 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 |
|---|---|
| ✓ ES6 Class | 54,756,900 Ops/sec |
| Function Prototype | 48,714,908 Ops/sec |
| Object Literal | 2,027,376 Ops/sec |