Loops vs HashSets
When looking up data in memory from a large collection, a HashSet or Dictionary is much, much faster than looping through an ordinary collection.
This example uses strings - if you run the same code but treat them as GUIDs, the numbers improve quite a bit, but the difference between array and HashSet is still tremendous.
Comments
Post a Comment