function vs object vs object with extern method vs classFastest: class (5.0x faster)
280,672 ops/sec
277,908 ops/sec
273,348 ops/sec
56,256 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| function | |
| object | |
| object with extern method | |
| class |
| Test name | Executions per second |
|---|---|
| ✓ object | 9,477 Ops/sec |
| object with extern method | 9,406 Ops/sec |
| class | 8,613 Ops/sec |
| function | 8,246 Ops/sec |