Since we never resize the underlying vector, we should be able to use a Box<[Word]> and thus reduce the size of a BitVecValue from 32 to 24 bytes. This means that we have to implement the SmallVec optimization ourselves. This may best be accomplished by making an enum like enum Data { U64(u64), U128(128), Big(Box<[Word]>) }. This way, we may be able to improve the performance when executing operations on values with less than 128 bits.
Since we never resize the underlying vector, we should be able to use a
Box<[Word]>and thus reduce the size of aBitVecValuefrom 32 to 24 bytes. This means that we have to implement theSmallVecoptimization ourselves. This may best be accomplished by making an enum likeenum Data { U64(u64), U128(128), Big(Box<[Word]>) }. This way, we may be able to improve the performance when executing operations on values with less than 128 bits.