function declaration vs function expression vs classFastest: function declaration (15.6x faster)
2,121 ops/sec
1,378 ops/sec
136 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| function declaration | |
| function expression | |
| class |
| Test name | Executions per second |
|---|---|
| ✓ function declaration | 2,353 Ops/sec |
| function expression | 1,277 Ops/sec |
| class | 166 Ops/sec |