Test case name | Result |
---|---|
Simple for loop - Access index and value | |
Array.forEach - Access index and value | |
for-of + Array.entries | |
for-of - Access value only | |
Simple for loop - Access value only | |
Array.forEach - Access value only |
Test name | Executions per second |
---|---|
Simple for loop - Access index and value | 6558.4 Ops/sec |
Array.forEach - Access index and value | 7637.5 Ops/sec |
for-of + Array.entries | 7443.6 Ops/sec |
for-of - Access value only | 7589.2 Ops/sec |
Simple for loop - Access value only | 6326.6 Ops/sec |
Array.forEach - Access value only | 7339.7 Ops/sec |