Test name | Executions per second |
---|---|
While Loop with cached parent_id | 42964.1 Ops/sec |
While Loop no caching parent_id | 37076.8 Ops/sec |
Using ForEach() instead of While Loop | 36241.7 Ops/sec |
While Loop without cache, using if/else instead of continue | 42766.1 Ops/sec |
While Loop without cache, using spread with assign | 24169.0 Ops/sec |
While Loop without cache, using spread only | 63355.4 Ops/sec |
For Loop version | 43409.1 Ops/sec |
Using ForEach() instead of While Loop, spread only | 62005.6 Ops/sec |
Using ForEach() instead of While Loop, spread only, no push() | 60506.7 Ops/sec |