Magnetic domain walls, in which the magnetization direction varies continuously from one direction to another, have long been objects of considerable interest. New concepts for devices based on such domain walls are made possible by the direct manipulation of the walls using spin-polarized electrical current through the phenomenon of spin momentum transfer. Most experiments to date have considered the current-driven motion of domain walls under quasi-static conditions, whereas for technological applications, the walls must be moved on much shorter timescales. Here we show that the motion of domain walls under nanosecond-long current pulses is surprisingly sensitive to the pulse length. In particular, we find that the probability of dislodging a domain wall, confined to a pinning site in a permalloy nanowire, oscillates with the length of the current pulse, with a period of just a few nanoseconds. Using an analytical model and micromagnetic simulations, we show that this behaviour is connected to a current-induced oscillatory motion of the domain wall. The period is determined by the wall's mass and the slope of the confining potential. When the current is turned off during phases of the domain wall motion when it has enough momentum, the domain wall is driven out of the confining potential in the opposite direction to the flow of spin angular momentum. This dynamic amplification effect could be exploited in magnetic nanodevices based on domain wall motion.