You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a thought experiment which would almost certainly be a breaking change, but something worth looking into nonetheless.
Right now, the inner representation of a NotNan<T> is a T. However, we know one thing about the value: it will never (soundly) be a NaN. Using this information, we could optimize the inner representation of the type so that Option<NotNan<T>> is a no-op. This could be done by using wrapping addition and subtraction combined with NonZeroU32/NonZeroU64. What are your thoughts on this?
The text was updated successfully, but these errors were encountered:
Here's a thought experiment which would almost certainly be a breaking change, but something worth looking into nonetheless.
Right now, the inner representation of a
NotNan<T>
is aT
. However, we know one thing about the value: it will never (soundly) be aNaN
. Using this information, we could optimize the inner representation of the type so thatOption<NotNan<T>>
is a no-op. This could be done by using wrapping addition and subtraction combined withNonZeroU32/NonZeroU64
. What are your thoughts on this?The text was updated successfully, but these errors were encountered: