ES6 Class vs Function Prototype vs Object LiteralFastest: Object Literal (192.9x faster)
155,098,064 ops/sec
874,401 ops/sec
804,091 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 |
|---|---|
| ✓ Object Literal | 94,969,264 Ops/sec |
| Function Prototype | 5,422,992 Ops/sec |
| ES6 Class | 4,515,448 Ops/sec |