ES6 Class vs Function Prototype vs Object LiteralFastest: Function Prototype (118.3x faster)
127,321,680 ops/sec
108,315,664 ops/sec
1,076,010 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 | 353,889,856 Ops/sec |
| ES6 Class | 319,007,776 Ops/sec |
| Object Literal | 955,784 Ops/sec |