Open Konard opened 5 years ago
It is?
[MethodImpl(MethodImplOptions.AggressiveInlining)]
Yes, the idea is not to store these ranges to save memory. We can try to use inlined property methods instead. But on the other hand, stored version might still be faster to access.
We need a benchmark to decide does [MethodImpl(MethodImplOptions.AggressiveInlining)]
help to get the copy of the structure using constructor from inlined property method faster than access to the field.
https://github.com/linksplatform/Ranges/blob/3d716693124f5fccb9cdb786c593d3f61236863d/Range.cs#L13