FastEnum
FastEnum copied to clipboard
The original order is not utilised.
For Enum.GetValues and GetNames , the elements of each array are sorted by the binary values.
Therefore, ~~continuity checks should be performed after casting to unsigned~~, and minimum and maximum value searches can be easily performed on this basis. (If there is no value cover, the configuration of s_orderedMembers is also not necessary.) https://github.com/xin9le/FastEnum/blob/db9a3796b48dc460bd24cb4ce1e825e37093bee0/src/libs/FastEnum.Core/Internals/EnumInfo.cs#L61-L85
Oh, I now understand current implementation is not so bad. But Distanced and Min/Max search are redundant.