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
It hopefully won't be necessary to expand the Box into an explicit NonZeroPtr pointer and NonZeroUsize length, but that is an option we could pursue if needed
Currently, we define
ShortVecto beThis requires 32 bytes on x86_64:
Vec<T>is 3*usize (24 bytes), and the discriminant requires one additional word.Pending some dependencies, for
T = NonZeroUsizeand smaller, 16 bytes should be achievable as follows:(thanks @Manishearth and @mikebenfield)
Some notes:
Variant, which is the motivating use case, we need to fix Make Option<TinyAsciiStr> be the same size as TinyAsciiStr #2083 firstBoxinto an explicitNonZeroPtrpointer andNonZeroUsizelength, but that is an option we could pursue if needed