Bird lungs work very differently from mammals. They have air sacs in front of and behind the lungs that take up a significant portion of their body cavity. The lungs themselves don't expand or compress. Air moves unidirectionally through the lungs both during inhalation and exhalation so there is no time at which the lungs themselves are not operating optimally. It is a two-phase system... during inhalation the posterior air sac fills with fresh air as spent air accumulates in the anterior air sac. The effective blood gas exchange surface area is about double that of mammals as well.
Basically: bird lungs are "pipelined" and highly optimized to extract oxygen even at altitude.