The compiler could treat const generics as function arguments behind the scenes when in "z" optimization. E.g., fn f<A: const u8>(x: f32) could be read as fn f(x: f32, A: u8) instead. The idea is to have less logic duplication in the resulting bytecode.
This is polymorphization; see previous conversations.
For now you need to do it by hand, since we don't have a pass for it. That applies both to type parameters
and to const parameters
But of course remember that this doing good things depends on really smart inlining -- after all, you don't want [u8; N]::eq going through memcpy, since just comparing i32s directly (with correct alignment handling) is much smaller in the code as well as faster, so polymorphizing doesn't actually always improve code size.