private static void Main(string[] args) { Stopwatch watch = new Stopwatch(); watch.Start(); foreach (string s in GetValidPasswordList()) { Console.WriteLine(s); } Console.WriteLine(watch.Elapsed); Console.ReadLine(); } public static IEnumerable<string> GetValidPasswordList() { int total = 0; for (int x = 1; x<63; x++) { for (int y = 1; y<63; y++) { for (int z = 0; z < ((y < 53 && x < 53) ? 63 : 11); z++) //24 seconds //for (int z = 0; z < 63; z++ ) // 31 seconds { yield return string.Format("{0}.{1}.{2} (Total:{3})", x, y, z, total++); } } } }Couldn't be bothered with real chars but the principle's the same. 24 seconds v 31