Enum Set Performance Comparison
I need to test if a some enum values are members of a set of enums. A lot.
There's a substantial difference in performance based on the data structure you use.
Here's one run on my development machine:
HashSet: | 35.9 ms |
F# set: | 1528 ms |
C#: | 116.2 ms |
C# (int input): | 14.58 ms |
F# (generic enum): | 42.7 ms |
F# (IConvertible): | 123.7 ms |
F# (int input): | 12.83 ms |