Accessing random index in array vs Accessing random index in mapFastest: Accessing random index in array (1.2x faster)
28,839 ops/sec
23,917 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Accessing random index in array | |
| Accessing random index in map |
| Test name | Executions per second |
|---|---|
| ✓ Accessing random index in array | 104,364 Ops/sec |
| Accessing random index in map | 91,467 Ops/sec |