Esempio n. 1
0
        public void SpeedTest()
        {
            int          N        = 10000000;
            List <ulong> testList = CreateList(N);


            long         start   = System.Environment.TickCount;
            List <ulong> newList = new List <ulong>();

            foreach (ulong val in testList)
            {
                newList.Add(val);
            }
            long start2 = System.Environment.TickCount;

            IndexSequence.Builder test = new IndexSequence.Builder();
            foreach (ulong val in testList)
            {
                test.Add(val);
            }
            long end = System.Environment.TickCount;

            Console.WriteLine($"Times: list: {start2-start}, indexsequence: {end-start2}");

            Assert.True((end - start2) / (start2 - start) < 2.5);
        }