Different implementations of a Collatz iterator and their performance