In order to more efficiently represent small types like arrays of u16 or u32 without being padded to u64, it would be helpful (although not absolutely required) for the compiler to have opcodes similar to LB & SB for u16 and u32. Without these, the compiler will have to generate suboptimal bytecode using chains of LB and and SB which only move one byte at a time between registers, use extra scratch space to bitmask the high bits, etc.
Related to https://github.com/FuelLabs/sway/pull/4929
In order to more efficiently represent small types like arrays of u16 or u32 without being padded to u64, it would be helpful (although not absolutely required) for the compiler to have opcodes similar to
LB
&SB
for u16 and u32. Without these, the compiler will have to generate suboptimal bytecode using chains of LB and and SB which only move one byte at a time between registers, use extra scratch space to bitmask the high bits, etc.