Test name | Executions per second |
---|---|
Basic for loop | 6135.0 Ops/sec |
For loop but caching the length | 618722.6 Ops/sec |
While loop that imitates a for loop | 8208.0 Ops/sec |
While loop that imitates a for loop caching len | 627769.2 Ops/sec |
While loop in reverse simplifying the test | 625870.2 Ops/sec |
While looping by popping values | 5670000.0 Ops/sec |
for ... in loop | 4017103.2 Ops/sec |
for ... in loop with integer test | 3777636.0 Ops/sec |
For loop testing on existence rather than lengt | 6179414.0 Ops/sec |
For loop testing on existence plus array lookup | 6515080.0 Ops/sec |
For testing on existence rather than length array | 6045977.5 Ops/sec |
For reference | 5636906.0 Ops/sec |
Array.forEach() native implementation. | 5811463.5 Ops/sec |
For reference against forEach() | 6533835.0 Ops/sec |