Size of the box alters the noise emitted but, providing the box is an absorption design, won't make much difference to power lost. I did extensive testing some years ago on this. The difference between an absorption pack of 12" long and 24" long was so minimal, it was almost undetectable. What makes a difference is how the silencer is constructed. If the silencer is constricted at the joints, like many are, flow reversion can occur and power will be lost.
It's important that the pipe diameter doesn't alter down its entire length, this includes the bends. Crush formed bends constrict the pipe diameter and so impede the flow gas. All bends need to be mandrel formed to maintain pipe diameter to the chosen ID.