ES6 Class vs Function Prototype vs Object Literal vs FunctionalFastest: Functional (75.9x faster)
170,659,232 ops/sec
162,627,904 ops/sec
114,285,536 ops/sec
2,247,652 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 | |
| Functional |
| Test name | Executions per second |
|---|---|
| ✓ Function Prototype | 209,620,464 Ops/sec |
| Functional | 191,990,464 Ops/sec |
| ES6 Class | 144,972,544 Ops/sec |
| Object Literal | 2,647,418 Ops/sec |