FastEnum icon indicating copy to clipboard operation
FastEnum copied to clipboard

The original order is not utilised.

Open akeit0 opened this issue 11 months ago • 1 comments

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

akeit0 avatar Jan 14 '25 09:01 akeit0

Oh, I now understand current implementation is not so bad. But Distanced and Min/Max search are redundant.

akeit0 avatar Jan 14 '25 10:01 akeit0