Test name | Executions per second |
---|---|
Basic for loop | 121.0 Ops/sec |
For loop but caching the length | 3571.6 Ops/sec |
While loop that imitates a for loop | 118.0 Ops/sec |
While loop that imitates a for loop caching len | 3642.1 Ops/sec |
While loop in reverse simplifying the test | 1800.5 Ops/sec |
While looping by popping values | 8760227.0 Ops/sec |
for ... in loop | 5784469.5 Ops/sec |
for ... in loop with integer test | 5418856.0 Ops/sec |
For loop testing on existence rather than lengt | 9429943.0 Ops/sec |
For loop testing on existence plus array lookup | 9693594.0 Ops/sec |
For testing on existence rather than length array | 9282144.0 Ops/sec |
For reference | 10606084.0 Ops/sec |
Array.forEach() native implementation. | 8541040.0 Ops/sec |
For reference against forEach() | 9639600.0 Ops/sec |