-
Book Overview & Buying
-
Table Of Contents
.NET 4.0 Generics Beginner's Guide
By :
How fast can we find the union of two or more sets?
Being able to find unions of large sets in a short time is what makes a 21st century algorithm click. We are living in a very interesting time and there is lot of data around us. Our applications have to deal with loads of data every day. But a seemingly simple task of keeping duplicate items at bay is a stupendously difficult task in practice.
To avoid this, we need quick set implementations. The .NET Framework and C5 offer a couple of set implementations. We shall put these containers under a lot of stress and find out how they perform.
The benchmarking code for HashSet<T> and SortedSet<T> available in System.Collections.Generic is as follows:
using System;
using SCG = System.Collections.Generic;
benchmarking experimentsaboutusing System.Linq;
using System.Text;
using C5;
namespace PerformanceMap
{
class Program
{
static void Main(string[] args)
{
SCG.HashSet<string> set1 = new SCG.HashSet<...
Change the font size
Change margin width
Change background colour