heph
heph copied to clipboard
Possible specialisations for inbox
Just some thought on possible specialisations.
Specialise for small types, less than usize
, that can be atomically written.
Specialise for non-zero types, e.g. Box
, Rc
, Arc
(via NonNull
) and NonZeroUsize
, this would allow the zero value to be empty.
Both optimisations likely require specialization: https://github.com/rust-lang/rust/issues/31844.