*****************888and this guy goes on to argue with him****************
Wrong. The aim of the exhaust system is to allow the catalytic converter and emission system to effectively process exhaust gas to reduce emissions. Efficiency is a secondary factor, otherwise damage to the converter will occur.
Come along with me, visualizing the exhaust system and motor....
1. Gas velocity through the exhaust pipe is not continuous. The person who wrote your guide seems to treat exhaust gas as a continuous flow, which is not so. They paid lip service to the idea of pulses but then modeled their explanation in terms of pipe diameter and not geometry of the system, which is a big factor in "tuning" it so that pulses do not interfere with one another or form resonances that MAY cause increases in backpressure.
Exhaust gas "pulses". A pulse will contain a mixture of sine waves and thus different frequencies and thus will interfere with each freqs and pulses from other cylinders (and probably from previous pulses from the same cylinder - depending upon the transit time from the exhaust port to tail pipe.
The pulses will have SOME inference with one another. They may act like waves going down a canal, either reinforcing or canceling one other to some degree. This is where the frequencies present in the pulses matter, some will interfere, others will not. The shape of the exhaust, both in terms of the length of pathways but also a given diameter of pipe, matter. In a continuous flow bigger is better, but that may not be the case with pulsatile waves.
There will be turbulent flow through the interior of the pipe that will effect some viscous drag, as well as boundary layer conditions. This is dependent upon the diameter of the pipe though boundary layer conditions close to the side of the pipe are influenced by gas temperature and heat transfer, how much I'm uncertain.
There be transference of heat between the gas pulses themselves.
There is also mechanical transfer of vibration from the exhaust pipe to the gas and vice versa. Don't know how much of an effect that this will have on pressures and hence back pressure and flow rates.
The rate of gas pulsation is dependent upon the RPM of the motor. My intuition is that there will be an optimal rate of pulsation for a given exhaust system, one that causes the least amount of back pressure. Might even lie in the motor's normal sphere of operation.
We would have to model these effects to come up with a exhaust system shape and diameter of exhaust pipe.
The plot thickens.....
You have a catalytic converter which will alter the chemistry and thus the molality of the exhaust. That will alter back pressure to some degree. To make things even more interesting, you have two oxygen sensors which feedback into the ECU, which will then alter the chemistry of the exhaust, and this matters because fuel efficiency is a measure of average fuel consumption and not any particular singular combustion event. Chemistry is a big deal for fuel efficiency. There may other emission controls like EGR, which will be influenced by the ECU.
We have to view the exhaust as a coupled system, starting at the exhaust port, with influence from the other three exhaust ports, the effects through the exhaust manifold, through the catalytic converter, resonators if any and the topology of the exhaust system itself. PLUS the ECU!!!
I cannot assign weights to some of the effects, especially the catalytic converter, but I think it's safe to assume the follow effects go in this order of precedence... (however one must gather data rather than guess...)
1. RPM, which will be a factor with along displacement to govern total gas volume. We can view at this first approximation a simple "volume of displacement times the frequency that the piston compresses on the exhaust stroke divided by 2 (four stroke engine, every turn a piston rise and fall). You will probably never get any more gas into the system than the motor can deliver - though that Catalytic converter could create pressure through its chemical action. Changes the enthalpy of the gas either more or less to some unknown degree.
The frequency of the gas pulsations and their chemistry will affect resonant frequencies of the system and the interference of the gas pulsations.
2. The ECU will govern the chemistry of the exhaust and its temperature. I think the ECU is where anyone ought to start modifications, if it's legal in your locale.
3. The Yaris's VVT will have some effect upon valve timing, and hence the rate of dwell for the exhaust valve. Since the VVT is under the control of the ECU its effects will be fedback from the exhaust gas itself.
Back pressure from the catalytic converter, which will be governed in part by its temperature and the chemistry of the mixture and changes to the mixture.
I've just described backpressure, by the way, and not mileage. Mileage is a function of quantity of fuel per mile, which is dependent upon the efficiency of the motor, which will be moderated by the ECU.
Where backpressure, inside of the combustion chamber, comes into play is how it influences the combustion process, and indirectly influences the following combustion (since the exhaust gas carries away heat from the combustion chamber and thus influences how the next mixture will behave and influence the ECU through the O2 Sensor). So there is a thermal history effect at play here.
Unless you got a lab, lots of time and professionals to set it all up, I'd leave this problem to the Pros.