A direct comparison between continuous and discrete forms of
analysis of control and stability is investigated theoretically
and numerically. We demonstrate that the continuous method provides
a more energy-efficient means of controlling the switching of a
periodically-driven class-B laser between its stable and unstable
pulsing regimes. We provide insight into this result using the
close correspondence that exists between the problems of
energy-optimal control and the stability of a steady state.