Open
Description
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?
Metadata
Metadata
Assignees
Labels
No labels