Bipedal locomotion may occur over imperfect surfaces with bumps or other features that disrupt steady gait. An unexpected bump in the road is generally expected to slow down most types of locomotion. On wheels, speed may be regained quite readily with "cruise control" performed in continuous time. But legged locomotion is less straightforward, because the stance leg may be under-actuated, and the continuous-time dynamics are periodically disrupted by discrete ground contact events. Those events may also afford good control opportunities, albeit subject to the delay between discrete opportunities. The regulation of walking speed should ideally use these opportunities to compensate for lost time, and with good economy if possible. However, the appropriate control strategy is unknown. Here we present how to restore speed and make up for time lost going over a bump in the road, through discrete, once-per-step control. We use a simple dynamic walking model to determine the optimal sequence of control actions-pushing off from the leg at the end of each stance phase-for fast response or best economy. A two-step, deadbeat sequence is the fastest possible response, and reasonably economical. Slower responses over more steps are more economical overall, but a bigger difference is that they demand considerably less peak power. A simple, reactive control strategy can thus compensate for an unexpected bump, with explicit trade-offs in time and work. Control of legged locomotion is not as straightforward as with wheels, but discrete control actions also allow for effective and economical reactions to imperfect terrain.