Alveoli have features that speed up the rate of diffusion so that gases can be exchanged quicly. They have a thin exchange surface - the alevolar epithelium is only one cell thick, which means there's a short diffusion pathway, which speeds up diffusion. The alevoli also have a large surface area - the large number of alevoli means there's a large surface area for gas exchange. There is also a steep concentration gradient of oxygen and carbon dioxide between the alveoli and the capillaries, which increases the rate of diffusion - this is constantly maintained by the flow of blood and ventilation.