An exhaust system can be designed/tuned to work best (most efficiently evacuate to the exhaust gas and return a reflected pressure wave to keep the fresh charge from going out the exhaust) at a particular RPM. The header length and diameter is determined by the RPMs (frequency) and cylinder displacement. An engine's power peak will, however, be primarily determined by the intake and cam lift/timing. If the exhaust is designed to force the torque peak to a lower RPM the ultimate torque peak will be lower. (If the exhaust is designed for a higher PRM than the rest of the engine, torque will be lost across the power band.)
Once you're past the headers, resonance tuning (length) doesn't have much effect. Once past the collectors I would want the least amount of flow resistance as possible.