How does the process of hashing work in Dictionary<TKey, TValue>

.net, c#

Solution

The hashing process in an Dictionary uses a technique that's refered to as chaining. With chaining, a secondary data structure is utilized to hold any collisions. Specifically, each slot in the Dictionary has an array of elements that map to a bucket. In the event of a collision, the colliding element is prepended to the bucket's list.

See this article on MSDN for more details.

Problem

How does the process of hashing work in Dictionary? I read that using dictionary provides faster look up. But did not understand how? How does the hashing and mapping to an index happen? Couldn't find any good reference. EDIT: How is the actual memory location where the object is stored obtained from the result of the hashing function?

Original source

Related problems