I initially designed ExtAwi, InlAwi, and Bits back before certain pointer related things were const, and after seeing https://crates.io/crates/thin-vec I realized that maybe I can in fact eliminate LEN or at least the unnecessary extra usize from all the types without needing custom DST support. I may even want to pursue storing bitwidth externally with bit storage like thin-vec since a lot more of these types tend to be used at the same time in a function vs the typical cases for Vec. This time around, we have the bitwidth as a header instead of a janky trailer, which should cancel out some extra ops incurred.
In 0.12 I finally figured out a workaround. The bitwidth is stored inline without the raw length (InlAwi still has LEN but only for the size of the array), and no more raw metadata digits are needed.
I initially designed
ExtAwi
,InlAwi
, andBits
back before certain pointer related things were const, and after seeing https://crates.io/crates/thin-vec I realized that maybe I can in fact eliminateLEN
or at least the unnecessary extrausize
from all the types without needing custom DST support. I may even want to pursue storing bitwidth externally with bit storage likethin-vec
since a lot more of these types tend to be used at the same time in a function vs the typical cases forVec
. This time around, we have the bitwidth as a header instead of a janky trailer, which should cancel out some extra ops incurred.