forEach vs array.entries vs forFastest: forEach (1.2x faster)
297 ops/sec
249 ops/sec
240 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| forEach | |
| array.entries | |
| for |
| Test name | Executions per second |
|---|---|
| ✓ for | 2,826 Ops/sec |
| array.entries | 2,663 Ops/sec |
| forEach | 2,453 Ops/sec |