The reason that the diesel loses less is the basic principle of the engines. The gasoline engine uses a fuel/air mixture, which is either generated volumetrically in a carburator or throttle body. When the number of air molecules per volume decreases at altitude, the computer is "fooled" by the equal volume. The diesel compresses a fixed volume of air and then injects fuel at full compression. The reduced air concentration has a lower effect at compression than at ambient conditions. The diesel is also more fuel-efficient, getting more BTUs per unit out of the fuel, which also aids in minimizing the effect. I suppose that the mass air flow sensor will make the diesel run a bit rich, but most diesels don't mind that, they just smoke a bit and rumble on! The air/fuel mixture in a gasoline engine is much more sensitive to losses when running rich or lean.