I am testing the speed of getting data from Dictionary VS list.
I\'ve used this code to test :
internal class Program
{
private static void Mai
When it comes to lookup of data, a keyed collection is always faster than a non-keyed collection. This is because a non-keyed collection will have to enumerate its elements to find what you are looking for. While in a keyed collection you can just access the element directly via the key.
These are some nice articles for comparing list to dictionary.
Here. And this one.
When using Dictionary you are using a key to retrieve your information, which enables it to find it more efficiently, with List you are using Single
Linq expression, which since it is a list, has no other option other than to look in entire list for wanted the item.