Suck. Squeeze. Bang. Blow. There’s no joke to be made there—you’re looking at the DNA of the four-stroke internal combustion engine, virtually unchanged since Dr. Nikolaus Otto first built it in Germany back in 1876.

Despite this system’s longevity, we’re still finding ways to make engines more efficient. Like any machine, internal combustion engines waste a lot of their theoretical performance—less than 30 percent of the energy in each drop of gas is used to actually move the car. That's because engines are complicated machines with lots of moving pieces of metal, and moving them around thousands of times a minute generates waste heat. Sucking air into a cylinder at a lower engine speed is also harder than doing it at 6000 rpm. Accessories like the water pump and alternator all suck away some power, too.

Careful design work on these bits won't double power or efficiency, but lots of small improvements here and there add up. More significant gains can most easily be achieved by getting more air into the cylinder, so it's here that many of the world's largest car makers have focused their R&D efforts, taking advantage of the breathtaking increase in computing power to build engines that would be unthinkable even a couple of decades ago. The tech has already begun to pay real dividends to drivers. Here's how it works.

Take it from the top

As the name suggests, the internal combustion engine—unlike a steam engine—burns its fuel inside the engine housing. The process has four basic stages. It starts with a combustion chamber capped at one end by intake and exhaust valves, then by a piston, connected to a crankshaft, at the other. As the crankshaft turns, the piston drops to the bottom of the cylinder, sucking in air from the intake valve (this is called the "intake stroke"). At the same time, fuel is sprayed in to the expanding cylinder, which mixes with the air. As the crankshaft continues to rotate, the piston moves back up and compresses this fuel and air mix (the "compression stroke"). Once the piston is at the top of the cylinder and the fuel-air mix is under the greatest pressure, it's ignited by a spark. This causes it to explode, which in turn pushes the piston back down again, turning the crankshaft ("the power stroke"). Finally, as the piston moves back up once more, the exhaust valves open and exit, stage right ("the exhaust stroke").

The flow of air into the engine is controlled by a throttle valve, sitting between the air intake and the engine manifold. Pushing on the right-most pedal in your car opens this valve further. Sensors measure the amount of air coming in, as well as how hot it is. Based on this information, the engine knows how much fuel to add and the spark plugs know when to fire. More air means more fuel, which together mean larger explosions. Larger explosions have more energy to transfer to the pistons, which turn the crankshaft more rapidly.

In a conventional engine, the intake and exhaust valves are controlled by a camshaft, which is turned by the crankshaft (which in turn rotates as the pistons force it down during each bang). Lobes on the cam push each valve open and then allow it to close, timed for each stroke of the cycle. The timing of valves opening and closing is fixed by the shape of the lobes on the camshaft. The amount the valve opens is fixed, too (this is called valve lift). The simplest engines have one intake and one exhaust valve per cylinder, both controlled by a single camshaft. By using two camshafts—one for intake valves and one for exhaust valves—each cylinder can have two or even three intake valves and two exhaust valves, making it easier to get air into and out of the engine. The aim is to get as much air as possible, sometimes expressed as volumetric efficiency. For instance: a two liter engine that sucks in two liters of air each cycle would have a volumetric efficiency of 100 percent. In practice, most engines have a much lower figure.

Car engines have to operate under lots of different conditions—at idle, under partial load, at full throttle—and we expect them to perform well, no matter what. Engineers have to design the engine to perform well in each scenario, but this comes at the cost of being optimal at none. Building a fixed timing engine that idles well gives up some top end performance; getting good top end performance means giving up some fuel efficiency at lower revs (not to mention more emissions).

When the throttle is fully open at high revs, the goal is to produce as much power as possible. To maximize the amount of air in the cylinder, the intake valves should be open as long as possible even before the start of the intake stroke, then remain open into the compression stroke. Opening the valve before the intake stroke allows it to begin filling the cylinder even as it starts increasing in volume. And, as the mass of air is pulled in by the partial vacuum, it gains momentum that doesn't disappear instantly just because the next stroke has started or because a valve is trying to close against it.

Similarly, it's a good idea to open the exhaust valves a little before the exhaust stroke starts. It requires effort to move the piston up during the exhaust stroke, and opening the exhaust valve a little before the start of the exhaust stroke reduces the pressure the piston has to work against. Ultimately, this decreases frictional losses in the engine. And, as with the air coming into the engine during intake, the exhaust gases have momentum that won't disappear when the piston begins its next stroke (so the exhaust valves can be open for part of the intake stroke).

As a result, engines have an overlap period when both intake and exhaust valves are open. For high performance, a longer overlap is beneficial, but at low engine speed the pistons aren't moving as quickly, the partial vacuum generated by the expanding cylinder volume is lower, and so the velocity of the air being sucked into the cylinder is lower. At low engine speed, that means a long overlap can allow exhaust gases to enter the manifold and unburned fuel to exit the exhaust valves. This is why highly tuned engines like those in race cars don't like idling very much.