The human nervous system ensures that the body reserves its energy and expends as few calories as possible with every movement. Now, a new study reports that the nervous system performs this optimization in real time.

“Many of us perceive that we’re consciously lazy, but that seems to extend down to our subconscious nervous system,” said Max Donelan, a neuromechanist at Simon Fraser University in Canada and one of the study’s authors. Dr. Donelan and his colleagues reported their findings in the journal Current Biology.

They asked nine subjects to wear robotic exoskeletons and studied their walking patterns. The contraptions, similar to knee braces, allowed the researchers to control resistance to the knees, making it more or less difficult for participants to swing their legs.

After adjusting the resistance, Dr. Donelan said, “within a course of minutes these subjects shifted their gait to be more energetically optimal.” They made these changes even when the energy savings were quite small — less than 5 percent, in some cases.