Esempio n. 1
0
        public void RemoveItem(int size)
        {
            MultiValueDictionary <int, int> dict = new MultiValueDictionary <int, int>();

            for (int i = 0; i < size; i++)
            {
                for (int j = 0; j < 100; j++)
                {
                    dict.Add(i, j);
                }
            }

            foreach (var iteration in Benchmark.Iterations)
            {
                MultiValueDictionary <int, int> copyDict = new MultiValueDictionary <int, int>(dict);
                using (iteration.StartMeasurement())
                    for (int i = 0; i <= size; i++)
                    {
                        for (int j = 0; j <= 100; j++)
                        {
                            copyDict.RemoveItem(i, j);
                        }
                    }
            }
        }
Esempio n. 2
0
        public void RemoveItem(int size)
        {
            MultiValueDictionary<int, int> dict = new MultiValueDictionary<int, int>();
            for (int i = 0; i < size; i++)
                for (int j = 0; j < 100; j++)
                    dict.Add(i, j);

            foreach (var iteration in Benchmark.Iterations)
            {
                MultiValueDictionary<int, int> copyDict = new MultiValueDictionary<int, int>(dict);
                using (iteration.StartMeasurement())
                    for (int i = 0; i <= size; i++)
                        for (int j = 0; j <= 100; j++)
                            copyDict.RemoveItem(i, j);
            }
        }