public static async Task FindPrimeMultiThread() //12 seconds { var a = await Task.Run(() => PrimeCounter.PrimeLong(250000)); Console.WriteLine(a); var b = await Task.Run(() => PrimeCounter.PrimeLong(400000)); Console.WriteLine(b); }
public static void FindPrime() // 14 seconds { var a = PrimeCounter.PrimeLong(250000); Console.WriteLine(a); var b = PrimeCounter.PrimeLong(400000); Console.WriteLine(b); }