65.9K
CodeProject is changing. Read more.
Home

Accelerating Enum-Based Dictionaries with Generic EnumComparer

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.81/5 (31 votes)

Feb 20, 2009

CPOL

6 min read

viewsIcon

141746

downloadIcon

458

In this article, I will demonstrate a performance problem caused by boxing in Dictionaries that use Enums as keys, and will provide a solution using lightweight code generation (DynamicMethod).