When using 5.5 using iterators is quicker than checking for values and mapping a single value for each tick in the loop. This also makes it possible to just assume all values are mapped by wrapping the given iterator in a generator. example went from ~30s to ~15s.