Cells must operate far from equilibrium, utilizing and dissipating energy continuously to maintain their organization and to avoid stasis and death. However, they must also avoid unnecessary waste of energy. Recent studies have revealed that molecular machines are extremely efficient thermodynamically compared with their macroscopic counterparts. However, the principles governing the efficient out-of-equilibrium operation of molecular machines remain a mystery. A theoretical framework has been recently formulated in which a generalized friction coefficient quantifies the energetic efficiency in nonequilibrium processes. Moreover, it posits that, to minimize energy dissipation, external control should drive the system along the reaction coordinate with a speed inversely proportional to the square root of that friction coefficient. Here, we demonstrate the utility of this theory for designing and understanding energetically efficient nonequilibrium processes through the unfolding and folding of single DNA hairpins.