static void testWordSpell()
        {
            string[] lines;
            loadSampleFile(out lines);

            var wordLookup = new HashSet<string>(lines, StringComparer.InvariantCultureIgnoreCase);

            var random = new Random();
            string[] wordList = wordLookup.ToArray();

            string[] wordsToTest = Enumerable.Range(0, 1000000)
                    .Select(i => wordList[random.Next(0, wordList.Length)])
                    .ToArray();

            wordsToTest[12345] = "woozsh"; // Introduce a couple
            wordsToTest[23456] = "wubsie"; // of spelling mistakes.

            Console.WriteLine("select number of {0} words from total words {1}", wordsToTest.Count(), wordList.Count());

            {
                MyStopWatch s = new MyStopWatch("PLINQ with Parallel");
                var query = wordsToTest
                            .AsParallel()
                            .Select((word, index) => new IndexedWord { Word = word, Index = index })
                            .Where(iword => !wordLookup.Contains(iword.Word))
                            .OrderBy(iword => iword.Index);

                foreach (var mistake in query)
                    Console.WriteLine(mistake.Word + " - index = " + mistake.Index);
                s.WriteTimespan();
            }

            {
                MyStopWatch s = new MyStopWatch("PLINQ without Parallel");
                var query = wordsToTest
                            //.AsParallel()
                            .Select((word, index) => new IndexedWord { Word = word, Index = index })
                            .Where(iword => !wordLookup.Contains(iword.Word))
                            .OrderBy(iword => iword.Index);

                foreach (var mistake in query)
                    Console.WriteLine(mistake.Word + " - index = " + mistake.Index);
                s.WriteTimespan();
            }

            /*
            {
                MyStopWatch s = new MyStopWatch("PLINQ without Parallel");
                var query = from w in wordsToTest
                            where !wordLookup.Contains(w)
                            //orderby w.Index
                            select w; // new IndexWord {Word = w, Index = i);

                //foreach (var mistake in query)
                //    Console.WriteLine(mistake.Word + " - index = " + mistake.Index);
                s.WriteTimespan();
            }
             */
        }
        static void TestPLNQ2()
        {
            MyStopWatch s = new MyStopWatch("PLINQ without Parallel");
            IEnumerable<int> numbers = Enumerable.Range(3, 1000000);
            var Query =
                from n in numbers
                where Enumerable.Range(2, (int)Math.Sqrt(n)).All(i => n % i > 0)
                select n;

            int[] primes = Query.ToArray();

            Console.WriteLine("total num of primes {0}", primes.Count());
             //            foreach (int i in primes)
             //               Console.Write("{0} ", i);
            s.WriteTimespan();
        }