Performance of different implementations of a simple Collatz iterator