Open
Description
The Provenance
type defined here is 24 bytes in size:
use std::num::NonZeroU64;
pub enum Provenance {
Concrete {
alloc_id: NonZeroU64,
sb: NonZeroU64,
},
Wildcard,
None,
}
However, it should be possible to encode Provenance
in 16 bytes: e.g. (0usize, 0suize)
could encode None
and (0usize, 1usize)
could encode Wildcard
.
In Miri, a slight variant of this would help reduce the size of a fairly common type from 32 bytes to 24 bytes.
Unfortunately even #94075 does not help here. The entire concept of reading a single field to determine the discriminant is not flexible enough to represent this layout.